Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to get this logic in qlikview

select a.*,a.supplier_code,b.supplier_code

from transaction a

left join  customer  b

on a.customer_code=b.customer_code and a.supplier_code=b.supplier_code

where b.customer_code is null

6 Replies
prashantsanchet
Creator
Creator

Hi,

There are couple of way to achive this


1) Write SQL query from database


Once you connected to database and created connection string then write

load * ;

SQL

select a.*,a.supplier_code,b.supplier_code

from transaction a

left join  customer  b

on a.customer_code=b.customer_code and a.supplier_code=b.supplier_code

where b.customer_code is null

This will load the output of above query into qlik

arvind1494
Specialist
Specialist

tableA:

load * ,

customer_code&';'&supplier_code as mykey

from transaction;

left join

tableB:

load * ,

customer_code&';'&supplier_code as mykey

from customer;

Explination:

Above script will make join in between tableA and tableB based on mykey

Note:-

Please rename the fields in customer for avoiding synthetic key

Way2:

you can directly load query result into qlikview

sql select query

Anonymous
Not applicable
Author

TheseTable are from different database is it works

Anonymous
Not applicable
Author

I did this logic in Qlikview. But i am getting all null values in Table B why i didn't understand

arvind1494
Specialist
Specialist

You will get onlt one table A

because of joining

Anonymous
Not applicable
Author

But Matching Records in Table B we need to get that records