
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Select "no Match Data"
I need some help!!!!
I have two tables. The first one contains all products, the second one contains just some of them with other information.
Both have the same ID Product.
I want to select just the products that ARE NOT in the second table, but every selection I tried, or I had all lines, or I had the match points.
How do I do this?
It will nice if I get to create a Field as "Not in the second" or "In the second".
- Tags:
- qlikview_scripting
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI
Create a dummy field in a script.
Like
FirstTemp:
Load * from Firsttable;
Left join (FirstTemp)
Load productID,'Second' as flag from secondtable;
First:
Load If(IsNull(flag), 'Not in the Second', 'In the Second') As flag1 , * resident FirstTemp;
Drop table FirstTemp;
Please close the thread by marking correct answer & give likes if you like the post.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you just select all the data from the second table and then look and see which product ID's in the first table are greyed out?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI
Create a dummy field in a script.
Like
FirstTemp:
Load * from Firsttable;
Left join (FirstTemp)
Load productID,'Second' as flag from secondtable;
First:
Load If(IsNull(flag), 'Not in the Second', 'In the Second') As flag1 , * resident FirstTemp;
Drop table FirstTemp;
Please close the thread by marking correct answer & give likes if you like the post.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tks for reply, I'm a little bit weak in Script.
I'll crate this TempTable after the charge of the originals or Before?
My first Table is Faturamento and the Second, Contratos.
The key field is Chassi.
How can I build this script?
Tks again!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI
Try like this
Script begins:
//Join the first and second table by using Chassi and create the dummy field as flag
TempTable:
Load * from Faturamento ;
Left join (TempTable)
Load Chassi,'Second' as flag from Contratos;
//Create flag for the selection purpose after join both tables
First:
Load If(IsNull(flag), 'Not in the Second', 'In the Second') As flag1 , * resident TempTable;
// Drop the temporary Table
Drop table TempTable;
//Load the second Table
Second:
Load * from Contratos;
Hope it helps
Please close the thread by marking correct answer & give likes if you like the post.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tks a lot. It's working very well.
I needed load each field, 'cause I changed some field names in the place of load *, but in general worked very well.
At the first I was trying to load twice the same database, but now I understood the logical.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Can you please close the post, if you get the answer.
Please close the thread by marking correct answer & give likes if you like the post.
