Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dears,
I'm facing a problem:
This is a database query which I would want to run on a QV table (using a load statement and a QVD as source).
SELECT ID,PREDECESSOR_ID,STATUS,...
FroM T1
WHERE
ID not in (SELECT PREDECESSOR_ID FROM T1) AND
STATUS=OK
Goal: only display rows of table T1 for which there is no similar ID entry anywhere in the table within the PREDECESSOR_ID column.
For some reason I don't get this working.
I tried also with set analysis, but this brought me even more off track.
FYI: There is no possibility to run the query on the database directly.
Any other approach is perfect.
In fact, I only need to know the number of records resulting of the query.
Thanks in advance!
Kind regards,
Maarten
hi,
Try this.
First store the Table in QVD then use the below code
Load ID, PREDECESSOR_ID,.....
from T1
Load
PREDECESSOR_ID as ID
from T1 where not exists (ID,PREDECESSOR_ID ) and Status = 'OK';
I hope this helps.
hi,
Try this.
First store the Table in QVD then use the below code
Load ID, PREDECESSOR_ID,.....
from T1
Load
PREDECESSOR_ID as ID
from T1 where not exists (ID,PREDECESSOR_ID ) and Status = 'OK';
I hope this helps.
Thanks a lot! That did the job!