Discussion Board for collaboration on QlikView Scripting.
Hi, in script i load two tables,
LOAD DESCRIPTIVENAME as DESCRIPTIVENAME_ACT_DEFS,
ID as ID_ACT_DEFS,
INSTRUCTIVENAME as INSTRUCTIVENAME_ACT_DEFS;
SQL SELECT DESCRIPTIVENAME,
LOAD ACTIVITY_ID as ACTIVITY_ID_ACT_INST,
ID as ID_ACT_INST,
"IPROCESS_ID" as ID_PROCESS_INSTANCES,
"LASTASSIGNEDBY_ID" as LASTASSIGNEDBY_ID_ACT_INST,
"LASTWORKER_ID" as LASTWORKER_ID_ACT_INST,
STARTDATE as NA_STAN_DATA_ACT_INST,
SQL SELECT ACTIVITY_ID,
FROM "VT_DM_DATABASE"."BI_TWFLACTIVITYINSTANCES" WHERE EXISTS (ID_ACT_DEFS, ACTIVITY_ID);
And after adding this WHERE EXISTS ... statement i got the following error :
SQL##f - SqlState: 37000, ErrorCode: 4294963590, ErrorMsg: [Teradata][ODBC Teradata Driver][Teradata Database] Syntax error: parse error.
FROM "VT_DM_DATABASE"."BI_TWFLACTIVITYINSTANCES" WHERE EXISTS (ID_ACTIVITY_DEFS, ACTIVITY_ID)
I tried almost everything to solve this, what am i missing ?
Go to Solution.
EXISTS() is a QlikView function, not a SQL function. You cannot use QlikView functions in SQL statements.
Add the WHERE EXISTS() clause to the PReceding LOAD instead, and you're good.
in where exists clause use also SELECT ... FROM syntax.
FROM "VT_DM_DATABASE"."BI_TWFLACTIVITYINSTANCES" Where ID_ACT_DEFS Not In (Select ID from "VT_DM_DATABASE"."BI_TWFLACTIVITYDEFS");
STARTDATE as NA_STAN_DATA_ACT_INST WHERE EXISTS (ID_ACT_DEFS, ACTIVITY_ID);
FROM "VT_DM_DATABASE"."BI_TWFLACTIVITYINSTANCES" ;
I think you mean "ID_ACT_DEFS In" and not "ID_ACT_DEFS Not In"
Exists will need a sub query.
You seem to be mixing the QlikView exists here.
Yes you are right