Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
henrikhagen
Contributor
Contributor

Problem with where exists statement

Hello,

I have two qvd files, one with customer data and one with order data. I want to load data from a specific customer and only the orders related to that customer. I use this script which works fine:

LOAD *

FROM [GDS DATA\Hoved.qvd] (qvd)

where [Customer Number]='104052';

LOAD *

FROM [GDS DATA\Line.qvd] (qvd)

where exists([Order Number],[Order Number]);

Now I want to do the same but only with specific payment codes but I do not know how to make the statement. The example below works with one specific payment code but how do I add more? I have tried with OR but then it loads all orders again not the ones related to the specific customer.

LOAD *
FROM [GDS DATA\Hoved.qvd] (qvd)
where [Customer Number]='104052';

LOAD *

FROM [GDS DATA\Line.qvd] (qvd)

where exists([Order Number],[Order Number]) and [Payment Code]=17;



Another question, how do I fix the sort order in list boxes so the available fields (white) comes first and not scattered around between not available fields (grey)?

Thanks,

Henrik







Labels (1)
0 Replies