Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
RK01923683
Contributor II
Contributor II

Using SQL's WHERE NOT EXISTS in qlik sense Script

Dear Experts,

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

Labels (3)
1 Reply
NadiaB
Support
Support

Hi RK01923683

 

As long as you have a connection to the database the script should work:

 

https://help.qlik.com/en-US/sense/May2021/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularSt...

 

<CONNECTION>

 

SQL Select column from table where condition=value;

 

It just has to be a valid SQL statement. 

 

Hope it helps.

 

 

Don't forget to mark as "Solution Accepted" the comment that resolves the question/issue. #ngm