Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Where NOT IN clause in LOAD statement

Good morning,

I have the following two tables:

TAB1

ID1
1
2
3
4
5
6
7
8
9
10

TAB2

ID2
1
2
3
4
5
7
8
9

I need to load all records from TAB1 where rows are not in TAB2. With a sql statement i should do this

select * from TAB1 where ID1 not in (select ID2 from TAB2)

But with LOAD statement how could i do?

3 Replies
sunny_talwar

May be this

Table:

LOAD ID1

FROM TAB1;

Concatenate (Table)

LOAD ID2 as ID1

FROM Tab2

Where not Exists(ID1, ID2);

its_anandrjs

Try with

TAB2:

LOAD ID2

From Source;

TAB1:

LOAD ID1

From Source Where not Exists(ID2,ID1);

//IF TAB2 not required you can drop it

Drop Table TAB2;

Not applicable
Author

Thanks Anand,

that's the right solution.

Thank you all