Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi gurus,
How to transform sql load in Qlikview. if I use the same below code in Qlikview script its taking long time to fetch data .
can any one help me on this
select table1.vendor_Name,amount,code ,table2.invoice_amount from table 1,table2
where table1.ID=table2.ID
Thanks Inadvance
Hi Are,
First connect QV with your SQL database and load the data from the required table using the wizard.
In script i will acutomatically generate the basic script.
In this case:
Tab1:
Load
id,
vendor_name,
amount,
code,
form table 1;
inner join (Tab1)
load
id,
invoice_amount
from table 2;
Hope it helps.
Qlikview will automatically identify ID as primary key and join them
Regards
KC
Like this
Table1:
Load
ID,
vendor_Name,
amount,
code;
from table1;
left join(Table1)
Load
ID,
invoice_amount;
from table2;
regards
ASHFAQ
hi jyothish,
hi thanks for ur time,
here I observed ID is not Primary key in two tables
Hi Are,
There should be a primary key between both the tables, other wise you wont be able to join them (same as sql).
According to your query (where table1.ID=table2.ID) it shows ID is common in both the tables.
In case the name of primary key is different in both tables then we can rename them while loading in QV.
eg,
Tab1:
load
ID,
account
form table 1;
left join (Tab1)
tab2:
load
pr_ID as ID,
Name
from table 2;
Regards
KC