Groups | Blog | Home
all groups > sql server reporting services > july 2004 >

sql server reporting services : can we do string manipulation on a parameter?


Frank RS
7/31/2004 9:47:01 AM
I populated a parameter list with dataset.
The parameter @type_year has items look like
"plan_2000" or "Actual_2000".
Now my question is, if we can use some string function targeting @type_year in the query.
something like "select ...... from ... where
year=getyear(@type_year) and type=gettype(@type_year)" ?
Please let me know if you know the feasibility. Thanks.


Jéjé
7/31/2004 1:02:37 PM
you can. regarding your SQL database its easier to do.
for example in SQL Serbver, you can create 2 functions to extract the year
part or the type part of your parameter. (using the SQL substring function)

but I recommand to use 2 parameters
* 1 for the year
* 1 for the type


"Frank RS" <FrankRS@discussions.microsoft.com> a écrit dans le message de
news:2B0E0EA7-2955-4B9A-BEFA-053ECA609CB9@microsoft.com...
[quoted text, click to view]

AddThis Social Bookmark Button