Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
This works well
H_Order:
LOAD *, (OTAAOR & OTNUOR) AS KeyOrd;
SELECT *
FROM HORDER;
L_Order:
LOAD *,
(ORAAOR & ORNUOR) AS KeyOrd
WHERE EXISTS (OTNUOR, ORNUOR) ;
SQL SELECT *
FROM LORDER;
This one causes an error on EXIST istruction
H_Order:
LOAD *, (OTAAOR & OTNUOR) AS KeyOrd;
SELECT *
FROM HORDER;
L_Order:
LOAD *,
(ORAAOR & ORNUOR) AS KeyOrd;
SQL SELECT *
FROM LORDER WHERE EXISTS (OTNUOR, ORNUOR);
I have to use exist only after LOAD STATEMENTS ?
Many thanks in advance
Yes, because Where Exists is a QlikView function, AFAIK. You cannot take that into your SQL. I am sure there must be a way to check Where Exist in SQL, but that will have to be done by using the SQL queries.
Everything after SQL up to the semicolon will be sent to the SQL driver and executed by the driver.
SQL SELECT *
FROM LORDER;
If you want to use the QV function EXISTS(), you need to use it in a preceding QV LOAD statement.
Sunny, there exists also a SQL Exists() condition, but the syntax is different. I assume the OP is refering to the QV functions Exists().
Right, that's what I meant. There is definitely a way to do it but the syntax would require to have the two tables in one SQL and doing some manipulation. The back and forth interaction with SQL won't work the way tried above is what I was trying to refer.