Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comparing 2 tables and "deleting" from one of them

I have 2 tables. Table 1 contains 100 Store codes. Table 2 contains 1 Store code which is also in Table 1. I want to remove the store code from table 1 that exists in Table 2. I'm not sure of the syntax to do that. Can someone help?

3 Replies
Not applicable
Author

Hi,

Try and adapt this example:

----------------------------

Table1:

load RowNo() as CodeStore

AutoGenerate(100);

Table2:

load RowNo()+100 as StoreCode

AutoGenerate(99);

Concatenate

LOAD 2 as StoreCode

AutoGenerate(1);

Table3:

LOAD CodeStore as saveCode

Resident Table1

where not Exists(StoreCode,CodeStore);

Drop Table Table1;

RENAME Table Table3 to Table1;

RENAME Field saveCode to CodeStore;

-------------------------------

cordially,

Laurent

Not applicable
Author

i'm not sure but try outer join.

Not applicable
Author

Thank Laurent, I have been meaning to say thanks, it was very helpful!