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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
nikhilgarg
Specialist II
Specialist II

How to get Uncommon rows from 2 tables ?

Hey,

Let say i have following 2 tables and i want only UNcommon rows from both tables.

How to get it  ?

Table1 :

LOAD * INLINE [

    Table1_Id, Value

    1, 100

    2, 200

    3, 300

    4, 400

    5, 500

];

Table2 :

LOAD * INLINE [

    Table1_Id, Value1

    1, 1000

    1, 1000

    3, 3000

    5, 5000

    6, 6000

    7, 7000

] ;

1 Solution

Accepted Solutions
NareshGuntur
Partner - Specialist
Partner - Specialist

Hi Nikhil,

Please use the below script.

The final output is

Table1_Id Value Value1
2200
4400
66000
77000

Table1 :

LOAD * INLINE [

    Table1_Id, Value

    1, 100

    2, 200

    3, 300

    4, 400

    5, 500

];

Join

Table2 :

LOAD * INLINE [

    Table1_Id, Value1

    1, 1000

    1, 1000

    3, 3000

    5, 5000

    6, 6000

    7, 7000

] ;

NoConcatenate

Table3:

LOAD *

Resident Table1

Where IsNull(Value) or IsNull(Value1);

DROP Table Table1;

Cheers,

Naresh

View solution in original post

4 Replies
Not applicable

Hi nikhil,

Use where not exists(field_name) at the end of the load statement of tab2.

hope it will get you the unmatched records in two tables.

Regards,

Barathiraja

nikhilgarg
Specialist II
Specialist II
Author

HEy ,

I used following script but it is giving me error after Not Exists statement on FiledName:

Table1 :

LOAD * INLINE [

    Table1_Id, Value

    1, 100

    2, 200

    3, 300

    4, 400

    5, 500

];

Join

LOAD * INLINE [

    Table1_Id, Value1

    1, 1000

    1, 1000

    3, 3000

    5, 5000

    6, 6000

    7, 7000

] Where not Exists Table1_Id ;

Not applicable

hi,

use like this where not exists (Table1_ID);

NareshGuntur
Partner - Specialist
Partner - Specialist

Hi Nikhil,

Please use the below script.

The final output is

Table1_Id Value Value1
2200
4400
66000
77000

Table1 :

LOAD * INLINE [

    Table1_Id, Value

    1, 100

    2, 200

    3, 300

    4, 400

    5, 500

];

Join

Table2 :

LOAD * INLINE [

    Table1_Id, Value1

    1, 1000

    1, 1000

    3, 3000

    5, 5000

    6, 6000

    7, 7000

] ;

NoConcatenate

Table3:

LOAD *

Resident Table1

Where IsNull(Value) or IsNull(Value1);

DROP Table Table1;

Cheers,

Naresh