Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Hi All

I have such SQL query wich inside has subselect statement
---------------------------
Select
A.[Type]
, B.[Exception]
, A.Item
, A.Location
, A.Date as A_Date


,(
Select TOP 1 A1.Date
From TableA as A1
Where
A1.Date >A.Date
and A1.[Type] = 1
and A1.Item = A.Item
and B.Key2 = A.Location
Order by A.Date asc
) as A1_Date

From TableA as A
Left join TableB as B on B.Key1 = A.[User]
Where A.[Type] = 7
-------------------------
The question is how to write this SQL subselect part in LOAD if my SQL query would be more simple like this
-------------------------
Select
A.[Type]
, B.[Exception]
, A.Item
, A.Location
, A.Date as A_Date
From TableA as A
Left join TableB as B on B.Key1 = A.[User]
Where A.[Type] IN (1, 7)
-------------------------

Thanks in advance 🙂

0 Replies