Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
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.
 
					
				
		
 neha_shirsath
		
			neha_shirsath
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		How do you define your variables? complexid and parentid?
 
					
				
		
 agigliotti
		
			agigliotti
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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;
