SQLTeam.com | Weblogs | Forums

How to add parameter to this quesry


How do I add parameters to this query? My SP requires them but I can not figure out how to get it to work.


SELECT * INTO #tmptbl


,'set fmtonly off exec DB.dbo.Rpt_PrintSp')

SELECT * from #tmptbl
drop table #tmptbl


add parameter to the OPENROWSET statement ? You will need to use Dynamic SQL to do that


You should go to this here you can see that how can you pass the parameters to the query. http://arcanecode.com/2010/07/13/adding-query-parameters-to-sql-server-2008-reporting-services-reports/