- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Load From QVD Where MATCH from Previous Qlikview Table
Hi,
I am trying to create a load for Customer Orders where the field Order Code is in the list of Codes brought back from the previous tab, which is the load for the order codes needed for this area of the business.
I know that I can use the MATCH keyword but not sure how I can link the field from the Customer Order load to the appropriate field in Order Code.
I need something along the lines of;
where match(c_order_code,(load order_code from order_codes));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be like this:
Where Exists(order_codes, c_order_code)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cheers,
So does the loaded Qliview Table get mentioned first and then the field you want to check that exists come next?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For using the Exists function , first you need load the table. On the second table you need to use the exists function Make sure the first table field column and second table field column are same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the field name is the same in both tables then the exists clause simply becomes:
where exists(order_codes)
You only need the second parameter if the field names are different. Also useful in situations where the field is a compound key, for example
where exists(%OrderItemKey, Orderno & OrderItem)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, that is right. order_codes need to be in a table which has already been loaded. Also need to make sure that there are no other instances of order_codes available in other tables because Exists check against field value and not against field value from a certain table. So make sure to give this field a uniquename for comparison, may be something like this:
Table:
LOAD order_codes,
order_codes as Comparison
FROM....
CheckTable:
LOAD Stuff....
FROM ....
Where Exists(Comparison, c_order_code)