tsql - How to incorporate the use of SSRS Dataset parameters with Timestamp escape clause? -
i've following clause of sql query string in ssrs dataset:
where "input_date" >={ts '2009-01-01'} , "input_date" < {ts '2009-12-31'}
and now, i'd use report parameter wrap dates in sql statement, i.e. @indate1, , @indate2.
i've tried this, error occurs:
where "input_date" >={ts @indate1} , "input_date" < {ts @indate2}
please kindly advise. thanks.
what have done add these parameters? assume have altered dataset query changes have posted in question. there 2 more steps need perform make work:
- define new parameter parameters folder. right click parameters folder , choose add parameter. specify values want user able select. repeat second parameter.
- add parameters dataset using report. can done in parameters section when edit dataset. add 2 parameters names
@indate1
,@indate2
, , set each parameters value parameters defined in step one. - alter sql statement described in post. think sql should (assuming
input_date
column in table):
where input_date >= @indate1 , input_date < @indate2
this specific bids 2008 version of visual studio. if using report builder or else, please let me know, , can change instructions bit.
Comments
Post a Comment