Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Find separate values in two tables

Hi everybody,

I hope that you can help me, here is my question:

I have two tables , for example:

table1:     table2:

a.csv        a.csv

b.csv        d.csv

c.csv        e.csv

How can I extract from the table two only the values that are Not in table1?

I will be very appreciated if somebody knows how to do it.

ps: maybe you know a good book about qlikview?

Tags (3)
1 Solution

Accepted Solutions

Re: Find separate values in two tables

Hi,

Try to load with Key fields assume this example

Tab1:

Load *,ID From a.csv;

concatenate(Tab1)

Load *,ID From b.csv;

concatenate(Tab1)

Load *,ID From c.csv;

tmpTab2:

Load *,ID2 From a.csv;

concatenate(Tab2)

Load *,ID2 From d.csv;

concatenate(Tab2)

Load *,ID2 From e.csv;

Noconcatenate

FinalTable:

Load *,ID2 resident tmpTab2

Where Not Exists(ID,ID2);

Drop table tmpTab2;

Drop Table Tab1;

And read this post may help you

Re: Regarding Exist() function and it's functionality

Regards

Anand

View solution in original post

4 Replies
MVP
MVP

Re: Find separate values in two tables

Load

a.csv,

b.csv,

c.csv

from.....

load

a.csv,

b.csv,

c.csv

from...

where not exists(a.csv);

kushalthakral
Contributor III

Re: Find separate values in two tables

Hi Ira

u can simply write below script and your problem will be resolved

Table1:

Load

a.csv,

b.csv,

c.csv

from.....

right join(Table1)

load

a.csv,

b.csv,

c.csv

from...

Regards

Kushal Thakral

PS: About book i have a one tell me ur email id will send it to you.

Re: Find separate values in two tables

Hi,

Try to load with Key fields assume this example

Tab1:

Load *,ID From a.csv;

concatenate(Tab1)

Load *,ID From b.csv;

concatenate(Tab1)

Load *,ID From c.csv;

tmpTab2:

Load *,ID2 From a.csv;

concatenate(Tab2)

Load *,ID2 From d.csv;

concatenate(Tab2)

Load *,ID2 From e.csv;

Noconcatenate

FinalTable:

Load *,ID2 resident tmpTab2

Where Not Exists(ID,ID2);

Drop table tmpTab2;

Drop Table Tab1;

And read this post may help you

Re: Regarding Exist() function and it's functionality

Regards

Anand

View solution in original post

Not applicable

Re: Find separate values in two tables

Thank you very much guys!! each answer is very important for me