Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
data files for tests
Correction : WHERE Dist >= StartDist AND Dist <= EndDist;
maybe you like to use IntervalMatch?
regards
Darek
Hi Dariusz,
InrtervalMatch works only with date, no ?
The IntervalMatch prefix is used to create a table matching discrete numeric values to one or more numeric intervals.
regards
Darek
data files for tests
Hi Joshua,
like Darek suggested, you could use the IntervalMatch prefix e.g. like this:
Table1:
LOAD StartDist,
EndDist,
Store_Id
(txt, utf8, embedded labels, delimiter is '\t', msq);
Table2:
LOAD Dist,
Price
(txt, utf8, embedded labels, delimiter is '\t', msq);
tabLink:
IntervalMatch(Dist)
LOAD Distinct
StartDist,
EndDist
Resident Table1;
regards
Marco
Hi Marco,
Thank for you response but is it possible to have one table ?
Thanks at all for your help.