Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

yamananalytic
Contributor II

Select Statement not working properly

Hi guys,

I would like to share with you this table.

11.png

i want to select only rows having ComplexTypeID=00000000-0000-0000-0000-000000000000 by this script:

complexid='00000000-0000-0000-0000-000000000000';

EventTimeLinetable:

select ComplexTypeID as CTID,Value from EventsTimelineDetail where ComplexTypeID='$(complexid)';

but as the result i got all three rows

12.png

What is wrong in the script!!!?

stalwar1

swuehl

omarbensalem

2 Replies
agigliotti
Honored Contributor II

Re: Select Statement not working properly

maybe this:

SET complexid = '00000000-0000-0000-0000-000000000000';

EventTimeLinetable:

LOAD * Where CTID = '$(complexid)';

sql select ComplexTypeID as CTID, Value from EventsTimelineDetail;

MVP
MVP

Re: Select Statement not working properly

Maybe the script is auto-concatenating the records to an already existing table with same number and name of fields?

Note that the table view says Battle_Event_Details while your script label tells EventTimeLinetable.

And also check if you need to use curly brackets around your ID filter value or not.