Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am using the script below to pull data from a table. I only want to pull data where TranDateTime > 2008 or if the AccountNumber exists in the Account table. I have a QVD called Accounts.qvd that has AccountNumber but am not sure how to use an OR clause in the script. Any idea how to do this?
Thanks in advance for your help!
LOAD
AccountNumber,
TranDateTime,
Amount
FROM
WHERE YEAR(TranDateTime) > 2008 OR AccountNumber IN(LOAD AccountNumber FROM
Hi,
As per my knowledge, using Exists() is the best way, also I think it is the only way. Exists is a faster way, since you need subquery like feature, but in qlikview scripting there is no such concept.
Regards,
Jagan.
You can use the 'Exists' to check whether the account number exists in the QVD.
Regards,
Raj.
Hi,
Try script below
Accounts:
LOAD
*
FROM
Transactions :
LOAD
AccountNumber,
TranDateTime,
Amount
FROM
WHERE YEAR(TranDateTime) > 2008 OR EXISTS(AccountNumber);
Hope this helps you.
Regards,
Jagan.
Thanks Jagan, is there any other method? I am relucatat to use EXISTS as it checks record by record and so is slow. Thanks for your help!
Hi,
As per my knowledge, using Exists() is the best way, also I think it is the only way. Exists is a faster way, since you need subquery like feature, but in qlikview scripting there is no such concept.
Regards,
Jagan.