You are not logged in.
Dear users of this forum,
we are pleased to inform you that we will be updating the software behind this forum in the near future.
Existing posts, users and categories will remain untouched.
Important:
We will keep you informed in the pinned thread.
Kind regards,
Your ReportServer Team
Liebe Nutzer dieses Forums,
wir freuen uns, euch mitteilen zu können, dass wir in naher Zukunft die Software hinter diesem Forum aktualisieren werden.
Existierende Beiträge, Nutzer und Kategorien bleiben weiterhin bestehen!
Wichtig:
Wir halten euch im angepinnten Beitrag auf dem Laufenden!
Mit vielen Grüßen
Euer ReportServer Team
Pages: 1
Hello
I am trying to write a query where its Where clause have an IN clause. For example:
where client in (${UserVariable})
The user variable is defined as String Parameter with comma seperated digits (e.g. - 1,2,3).
The problem is the Where clause return result for only the first digit in the comma seperated list and ignore the rest.
When I tried to define the variable as a List Parameter it didnt return any value and it looks that the list is completly ignored.
Could anyone please advise?
Thank you
Ronen
Offline
Hi Ronen,
if you have a list parameter (i.e., a datasource parameter or a user variable list) then you need to use the $X{IN, COLUMN, PARAMETER} syntax. that is
SELECT * FROM TABLE WHERE $X{IN, COLUMN, PARAMETER}Cheers
-Arno
Offline
Thanks Arno for the quick response.
I have tried this but still getting the same behaviour-
My where clause is : where $X{IN, client_uid, test}
If I am setting test to contain 4,5 the query returns output with entries having 4 in the client_uid column. If I am changing it to 5,4 it returns entries with 5 on the column.
What am I missing here?
Thanks
Ronen
Offline
Hi Ronen,
test must be a list-type parameter. That is you must use a user variable of the list type and separate the values with a '|' (pipe symbol).
Cheers
-Arno
Offline
Thank you very much Arno!
This helped a lot.
Offline
Pages: 1