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

Where Not Exists... Sort of....

Hi ,

I have an existing table that I am loading in:

RefNo
840420110602
840420110619
840420110664
840420110671
840420110688
840420110695
840420110701
840420110718

 

 

I then load in a new batch of codes :

RefNo
840420110602
840420110619
840420110664
840420110671
840420110688
840420110695
840420110701
840420110718
840420110725
840420110732
840420110749
840420110756
840420110763

 

 

I need to be only left with :

840420110725
840420110732
840420110749
840420110756
840420110763

 

As I need to run these through a check process.  Can anyone assist with the correct script for this please?

Many thanks,

Phil

2 Solutions

Accepted Solutions
Vegar
MVP
MVP

What do you mean by "sort of...."

Your example looks like it could be solved by just a where not exsists Like below. Please explain.

 

OldRefs:

Load

RefNo as exsistingRefNo

From table1;

NewRefs:

Load

RefNo 

From table1 

Where not exsists(exsistingRefNo, RefNo);

Drop table OldRefs;

View solution in original post

Brett_Bleess
Former Employee
Former Employee

Phil, did Vegar's post help you get what you needed?  If so, do not forget to return to the thread and use the Accept as Solution button on his post to give him credit for the assistance and to let other Community Members know this worked for you.  If you still have further questions etc., leave us an update.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.

View solution in original post

2 Replies
Vegar
MVP
MVP

What do you mean by "sort of...."

Your example looks like it could be solved by just a where not exsists Like below. Please explain.

 

OldRefs:

Load

RefNo as exsistingRefNo

From table1;

NewRefs:

Load

RefNo 

From table1 

Where not exsists(exsistingRefNo, RefNo);

Drop table OldRefs;

Brett_Bleess
Former Employee
Former Employee

Phil, did Vegar's post help you get what you needed?  If so, do not forget to return to the thread and use the Accept as Solution button on his post to give him credit for the assistance and to let other Community Members know this worked for you.  If you still have further questions etc., leave us an update.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.