Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Select Statement.

Hi guys

i am trying to write this statement in qlik sense inside my script but it does not working.

select ID from EventsTimeline where ComplexTypeID='$(complexid)' and EventsTimeline.ComplexTypeID IN (SELECT ID FROM ComplexType WHERE ComplexType.ParentID='$(parentid)') ;

how can write it correctly.

thanks.

rwunderlich

swuehl

omarbensalem

3 Replies
neha_shirsath
Specialist
Specialist

You don't need to write query as you can fetch this table.

Create qvd for EventsTimeline and ComplexType.


And call this qvd in your qvf file and you can use Joins to link this both tables.

sunny_talwar

How do you define your variables? complexid and parentid?

agigliotti
Partner - Champion
Partner - Champion

tab1:

sql select ID, ComplexTypeID as CTID from EventsTimeline where ComplexTypeID = '$(complexid)';

tab2:

sql SELECT ID as CTID FROM ComplexType WHERE ComplexType.ParentID = '$(parentid)';

inner join (tab1)

load * Resident (tab2);

drop table tab2;