Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I wanted to extract the data that not exists in other table. I am using this SQL Script:
Select a.ID
,a.LocId as StartLoc
,a.Date as BeginTime
from source as a
where a.Type = 'I'
a.Date between 'date1' and 'date2'
and a.LocId = 54
and not exists
(select * from source as c
where a.ID = C.ID
and where c.Type in ('O')
and a.Date < c.Date
and c.Date between 'date1' and 'date2')
i don't know how to create the same logic in qlik script i am not understanding how to do the not exist part.
Please help!
Thanks in advance
Table1:
select * from source
where Type in ('O')
and Date between 'date1' and 'date2');
Table2:
Load * where not exists(ID);
Select
ID
,LocId as StartLoc
,Date as BeginTime
from source
where Type = 'I'
Date between 'date1' and 'date2'
and LocId = 54;