Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

remove contracts comparing two files

Hi, everyone

I have two files, "File1" and "File2"

File1:

Contains all contracts

File2:

Contains all contracts that should be excluded


it is possible to remove the contracts in the script?



Example:

All contracts

tab1:

LOAD * Inline [

CONTRACT

1

2

3

4

5

6

7

8

9

10

];

contracts that should be excluded

tab2:

LOAD * Inline [

CONTRACT

1

2

3

4

5

];

Thanks!!

duvidaqlikv.PNG

4 Replies
sunny_talwar

May be this

tab2:

LOAD * Inline [

CONTRACT

1

2

3

4

5

];

tab1:

LOAD * Inline [

CONTRACT

1

2

3

4

5

6

7

8

9

10

] Where not Exists(CONTRACT);

its_anandrjs

Use Where exists.

Anil_Babu_Samineni

Where Not Exists(CONTRACT) will achieve

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
its_anandrjs

Do this way based on your table structure

tab2:

LOAD CONTRACT as Exc_CONTRACT;

LOAD * Inline [

CONTRACT

1

2

3

4

5

];

tab1:

LOAD * Inline [

CONTRACT

1

2

3

4

5

6

7

8

9

10

]Where not Exists(Exc_CONTRACT,CONTRACT);

DROP Table tab2;

Find attached