Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Selecting records from a table which are not present in other


Hi,

I have 2 qvd files and want to select records from a qvd file which are not present in other.

Lets say:

Table 1 :

Column1Column2
A12
B14
C15
D20
E45

Table 2:

Column1Col2
A7
B8
E9

What i want is records C, D from table A.

Thanks

1 Solution

Accepted Solutions
vishalwaghole
Valued Contributor II

Re: Selecting records from a table which are not present in other

Hi Pallavi,

Try this code,

Table2:
LOAD Column1,
     Col2
FROM
[http://community.qlik.com/thread/112713]
(html, codepage is 1252, embedded labels, table is @2);

Table1:
LOAD Column1,
     Column2
FROM
[http://community.qlik.com/thread/112713]
(html, codepage is 1252, embedded labels, table is @1)
Where not Exists (Column1,Column1);

DROP Table Table2;

and please refer attached file, it will help you.

- Regards,

Vishal Waghole

5 Replies
Not applicable

Re: Selecting records from a table which are not present in other

You can try using Not exists() function.

Something like this might be of help:

http://community.qlik.com/message/492029

Re: Selecting records from a table which are not present in other

Temp:

Load * from table2.qvd (qvd);

Table1:

noconcatenate

Load * from table1.qvd(qvd) where not exists(Column1);

Drop table Temp;


talk is cheap, supply exceeds demand
vishalwaghole
Valued Contributor II

Re: Selecting records from a table which are not present in other

Hi Pallavi,

Try this code,

Table2:
LOAD Column1,
     Col2
FROM
[http://community.qlik.com/thread/112713]
(html, codepage is 1252, embedded labels, table is @2);

Table1:
LOAD Column1,
     Column2
FROM
[http://community.qlik.com/thread/112713]
(html, codepage is 1252, embedded labels, table is @1)
Where not Exists (Column1,Column1);

DROP Table Table2;

and please refer attached file, it will help you.

- Regards,

Vishal Waghole

Re: Selecting records from a table which are not present in other

Load Column1, Col2 From ....

Load Column1, Column2 from.... where not exists(Column1);

Not applicable

Re: Selecting records from a table which are not present in other

Yes, not exists working..Thank you all..Smiley Happy

Community Browser