Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
load * inline [
LFARTEMP,
ZLI,
ZLD ];
[LIKP]:
Load
MANDT,
VBELN,
VKORG,
WADAT,
LFART,
KUNNR;
SQL SELECT MANDT VBELN VKORG WADAT LFART KUNNR from LIKP WHERE
Exists(LFARTEMP, LFART);
Exists() is a QlikView function, not an SQL function. It must therefore be in the LOAD, not in the SQL:
load * inline [
LFARTEMP,
ZLI,
ZLD ];
[LIKP]:
Load
MANDT,
VBELN,
VKORG,
WADAT,
LFART,
KUNNR
WHERE Exists(LFARTEMP, LFART);
SQL SELECT MANDT VBELN VKORG WADAT LFART KUNNR from LIKP ;
If you're concerned about the data select efficiency, have an index on LFART, and replace the exists with a hardcoded IN. That won't work, of course, if your desired values of LFART are being loaded earlier in the script, but if it's just a few values, it should work fine:
[LIKP]:
Load
MANDT,
VBELN,
VKORG,
WADAT,
LFART,
KUNNR;
SQL SELECT MANDT VBELN VKORG WADAT LFART KUNNR from LIKP
WHERE LFART IN ('ZLI','ZLD');