Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
suzel404
Creator
Creator

Join 2 tables with differents fields


Hi all,

I have a problematic. I want to join 2 tables in one when the Dist is between StartDist and EndDist.

But fields are not in common.

For example:

Table1:

LOAD

     Filed1,

     Field2,

     StartDist,

     EndDist,

FROM File1.qvd(qvd);

Table2:

LOAD

     Filed111,

     Field222,

     Filed333,

     Dist

FROM File2.qvd(qvd)

WHERE Dist <= StartDist AND Dist >= EndDist;

How can I realize it ?

Thank for your help.

1 Solution

Accepted Solutions
MarcoWedel

data files for tests

View solution in original post

9 Replies
suzel404
Creator
Creator
Author

Correction : WHERE Dist >= StartDist AND Dist <= EndDist;

Not applicable

maybe you like to use IntervalMatch?

regards

Darek

suzel404
Creator
Creator
Author

Hi Dariusz,

InrtervalMatch works only with date, no ?

Not applicable

The IntervalMatch prefix is used to create a table matching discrete numeric values to one or more numeric intervals.

regards

Darek

MarcoWedel

data files for tests

MarcoWedel

Hi Joshua,

like Darek suggested, you could use the IntervalMatch prefix e.g. like this:

Table1:

LOAD StartDist,

    EndDist,

    Store_Id

FROM http://community.qlik.com/servlet/JiveServlet/download/515682-103548/QlikCommunity_Thread_115537_Tab...

(txt, utf8, embedded labels, delimiter is '\t', msq);

Table2:

LOAD Dist,

    Price

FROM http://community.qlik.com/servlet/JiveServlet/download/515682-103549/QlikCommunity_Thread_115537_Tab...

(txt, utf8, embedded labels, delimiter is '\t', msq);

tabLink:

IntervalMatch(Dist)

LOAD Distinct

  StartDist,

  EndDist

Resident Table1;

regards

Marco

suzel404
Creator
Creator
Author

Hi  Marco,

Thank for you response but is it possible to have one table ?

jagan
Luminary Alumni
Luminary Alumni

Hi,

Check this thread hope it helps you.

IntervalMatch

Regards,

Jagan.

suzel404
Creator
Creator
Author


Thanks at all for your help.