Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Simulation of report parameters in T-SQL

$
0
0

Hi! I hope this is not a stupid question ...

 

I'd like to "simulate" multivalue report parameters in t-sql. Background is, that I'm developing statements for report datasets with management studio for convinience. The statements need to apply a filter based on a report parameter like this:

 

select a, b, c

from datasource

where a in (@listofitems)

 

Which works great in reporting services, since @listofitems is converted to 'item1', 'item2', ... by reporting services. I tried to simulate the parameter by using:

 

declare

@listofitems asvarchar(100);

set

@listofitems ='''Item1'', ''Item2''';

 

Unfortunatley it doesn't work as I expected. Has anybody had the same issue?

 

Cheers,

 

Martin.

 


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>