

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to select values in Table A that are not in Table B in script?
How do I do this in Qlikview?
Example:
Table A_
ItemNo
x1
x2
x3
x4
Table B
ItemNo
x1
x3
x4
How do I write a query (using Resident as both tables are already read) in the script that results in:
ItemNo
x3
as x3 is the only value that only exists in Table A
- Tags:
- qlikview_scripting
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe like this, adding to your script with existing tables:
TMP:
LOAD ItemNo as ExcludeItemNo Resident TableB;
LOAD ItemNo as OnlyInTableAItemNo Resident TableA where not exists(ExcludeItemNo, ItemNo);
drop table TMP;


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, first you would need to load Itemno and itemno as itemnocheck in your table B load, then you can load using where not exists ie:
load
itemno
resident table a_ where not exists(itemnocheck);
thanks
steve


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe like this, adding to your script with existing tables:
TMP:
LOAD ItemNo as ExcludeItemNo Resident TableB;
LOAD ItemNo as OnlyInTableAItemNo Resident TableA where not exists(ExcludeItemNo, ItemNo);
drop table TMP;


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Many thanks!
