Announcement

Migration of this forum

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:

  • Each user will need to reset their password.
  • Please select "I forgot my password".
  • Enter the email address you used to register in this forum.
  • You will receive an email with a link to set a new password.
  • Please choose a new (secure) password and confirm the process.

We will keep you informed in the pinned thread.

Kind regards,
Your ReportServer Team


Migration des Forums

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:

  • Jeder Nutzer muss sein Passwort neu vergeben.
  • Wählt dazu einfach "Ich habe mein Passwort vergessen".
  • Gebt die E-Mail-Adresse ein, mit der ihr registriert seid.
  • Ihr erhaltet eine E-Mail mit einem Link zur Passwortvergabe.
  • Bitte wählt ein neues (sicheres) Passwort und bestätigt den Vorgang.

Wir halten euch im angepinnten Beitrag auf dem Laufenden!

Mit vielen Grüßen
Euer ReportServer Team

#1 2015-12-09 10:04:38

Ronen
Member
Registered: 2015-10-12

Select In User_Variable

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

#2 2015-12-09 20:43:42

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: Select In User_Variable

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

#3 2015-12-09 21:50:31

Ronen
Member
Registered: 2015-10-12

Re: Select In User_Variable

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

#4 2015-12-09 21:58:42

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: Select In User_Variable

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

#5 2015-12-09 23:15:58

Ronen
Member
Registered: 2015-10-12

Re: Select In User_Variable

Thank you very much Arno!

This helped a lot.

Offline

Board footer

Powered by FluxBB