Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

yamananalytic
Contributor II

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
Valued Contributor

Re: Select Statement.

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.

Re: Select Statement.

How do you define your variables? complexid and parentid?

agigliotti
Honored Contributor II

Re: Select Statement.

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;

Community Browser