Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a 2 tables - One returns 24000 Transaction Lines and a second returns 1500 lines from a Financial Calendar QVD file. When I left join the Calendar table to the transaction table I get 24000*1500 transactions. I have compared the underlying data I have perfect matches. I have exported the table seperately to excel and performed a VLOOKUP function and get a match however when I perform a Left Join in QV I get a Cartesian join. Any help is appreciated
Table | Script | Sample Data Returned | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Transaction | Trans: Load TPROD AS POLineItem, TTDTE AS TransactionDate; SELECT * FROM $(vSystem).$(vTable) WHERE (TTYPE = 'U'); |
| ||||||||||||||||||||||
Calendar | Calendar: LEFT JOIN (Trans) LOAD Date as TransactionDate, FinanceYearPeriod; SELECT * FROM c:\Qlikview\QVDs\Calendar.qvd; |
|
I don't know if it helps, but I would skip the Calendar: prefix,
and get rid of the select * when reading from a qvd
like this:
Trans:
Load
TPROD AS POLineItem,
TTDTE AS TransactionDate;
SELECT * FROM $(vSystem).$(vTable) WHERE (TTYPE = 'U');
LEFT JOIN (Trans) LOAD
Date as TransactionDate,
FinanceYearPeriod
FROM c:\Qlikview\QVDs\Calendar.qvd;
I don't know if it helps, but I would skip the Calendar: prefix,
and get rid of the select * when reading from a qvd
like this:
Trans:
Load
TPROD AS POLineItem,
TTDTE AS TransactionDate;
SELECT * FROM $(vSystem).$(vTable) WHERE (TTYPE = 'U');
LEFT JOIN (Trans) LOAD
Date as TransactionDate,
FinanceYearPeriod
FROM c:\Qlikview\QVDs\Calendar.qvd;
Hi
Try like this
Trans:
Load
TPROD AS POLineItem,
TTDTE AS TransactionDate;
SELECT * FROM $(vSystem).$(vTable) WHERE (TTYPE = 'U');
LEFT JOIN (Trans) LOAD
Date as TransactionDate,
FinanceYearPeriod;
FROM c:\Qlikview\QVDs\Calendar.qvd(qvd);
Many thanks for your help. It worked this way.
Paul
Wouldn't it be better to credit the correct answer?
Mayil's answer has a syntax error,
mine has not.
/h
Gandalf