Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

harikumar
New Contributor

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
Contributor

Re: how to get this logic in qlikview

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
Contributor III

Re: how to get this logic in qlikview

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

harikumar
New Contributor

Re: how to get this logic in qlikview

TheseTable are from different database is it works

harikumar
New Contributor

Re: how to get this logic in qlikview

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

arvind1494
Contributor III

Re: how to get this logic in qlikview

You will get onlt one table A

because of joining

harikumar
New Contributor

Re: how to get this logic in qlikview

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