Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Wondering if I can do a nested select SQL statement in QLikview script... Qlikview seems grouchy though, however, I'm certain my syntax is not correct...
I have a QlikView file:TEMPFILE with only one "SchoolCode" field that contains distinct SchoolCode values.
So,
I want to LOAD new data from a database... using only data with SchoolCodes that are in the tempfile...
LOAD * From DBO.TABLENAME
WHERE SchoolCodes IN (select distinct SchoolCode from TEMPFILE)
;
What am I doing wrong?
Stephanie
Hello Stephanie,
You can do :
TempFile:
LOAD SchoolCode FROM TempFile.xls;
Table:
LOAD * FROM DBO.TABLENAME WHERE EXISTS (SchoolCode);
Hope it's gonna be helpful.
Martin
Hello Stephanie,
You can do :
TempFile:
LOAD SchoolCode FROM TempFile.xls;
Table:
LOAD * FROM DBO.TABLENAME WHERE EXISTS (SchoolCode);
Hope it's gonna be helpful.
Martin
Load your temp file in memory:
LOAD * FROM TEMPFILE.qvd (qvd);
After execute the SQL Statement:
LOAD * WHERE exists(SchoolCode);
SQL SELECT * FROM DBO.TABLENAME;
USE THE SQL COMMAND IN PLACE OF LOAD
SQL SELECT *
FROM DBO.TABLENAME
WHERE SCHOOLCODES IN (SELECT DISTINCT SCHOOLCODE FROM TEMPFILE)
REGARDS
TONIAL.
You folks are awesome. Thanks a bunch... I understand SQL... but mixing QlikView Scripting experience with it is where I am lacking.
Thanks again for the responses, I tried each of the methods as well.
Stephanie Lind
HI
I like to find out how to do a IN criteria when using a qvd load or a resident load.
Thanks
Hi Jack,
With QVD load You need use the match-function.
load * from ???.qvd where match(fieldname,value1,value2,...);