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 Exists.

Hello All,

I need some help! I have two Tables :

Table A:

ID Value

1 1000

2 3000

4 4000

Table B:

ID Value

2 3000

I need to be able to do a Resident load of all the 'ID's' from 'Table A' where they do not exist in Table B! Is this possible?

In this case ID's 1 & 4 would be returned.

Can any share on any thoughts on a sample load script which would achieve this?

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

Table A:

ID Value

1 1000

2 3000

4 4000

Table B:

ID Value

2 3000

TABLE_B:

LOAD ID AS ID_B, VALUE

FROM Table B

TABLE_A:

LOAD ID, VALUE

FROM Table a

WHERE NOT EXISTS(ID_B, ID);

View solution in original post

2 Replies
Not applicable
Author

Table A:

ID Value

1 1000

2 3000

4 4000

Table B:

ID Value

2 3000

TABLE_B:

LOAD ID AS ID_B, VALUE

FROM Table B

TABLE_A:

LOAD ID, VALUE

FROM Table a

WHERE NOT EXISTS(ID_B, ID);

pover
Luminary Alumni
Luminary Alumni

Change the column name in Table B to ID_TableB and then try something like the following:

Table C:
Load ID, Value
Resident [Table A]
Where not exists(ID,ID_TableB);

Regards