Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Retrieve lines which exist juste in one table

Hello all,

If i have two table

Table 1

A, B

1,5

2,8

3,9

Table 2

A,C

1,10

7, 14

0,0

I want retrieve juste the lines which exists in Table 1 but not exist in Table 2, How I have to proceed ?

in the above example, i have to retrieve (

2,8

3,9

)

Thanks in advance for your help

6 Replies
PrashantSangle

Hi,

Use exist()

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
PrashantSangle

Hi,

Try like

Table2

load * from table2;

noconcatenate

FinalTable1:

load * from table1

where not exist(A,A)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Thanks for your answer.

I thinks exist works just for one field. for me i have 6 fields in common like this :

Table 1

A,B, C,D, E, F, Y

1, 2, 3,4,  5, 6,  0

2, 4,6 ,8, 10,12, 1

3, 6, 9,12,15,18,  2

Table 2

A,B, C,D, E, F, Z

1, 2, 3,4,  5, 6,  0

the resullts must be :

2, 4,6 ,8, 10,12, 1

3, 6, 9,12,15,18,  2

Best regards


Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

Using WHERE NOT EXISTS should give you your result

LOAD * Inline [
A, B
1,5
2,8
3,9
]
;
Table2:

LOAD * Inline [
A,C
1,10
7, 14
0,0
]

Where NOT Exists(A,A);

PrashantSangle

Hi,

Try using OR /And

in where clause.

like not exists(A,A) or Exists(B,B)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
anbu1984
Master III
Master III

Table2:
Load *,A&B&C&D& E& F As Key Inline [
A,B, C,D, E, F, Z
1, 2, 3,4,  5, 6,  0 ]
;

Table1:
Load * Where Not Exists(Key);
Load *,A&B&C&D& E& F As Key Inline [
A,B, C,D, E, F, Y
1, 2, 3,4,  5, 6,  0
2, 4,6 ,8, 10,12, 1
3,6, 9,12,15,18,  2
]
;

Drop Table Table2;