datepart year from column as variable
I am writing a query to put in ssrs - the user is going to choose a year for a paramater - I want that paramater to be passed to the sproc so I've declare @year datetime set Year = '2009 -- for testing purposes in the where i have Datepart(year, invoice_date) = @Year but this is not working - does anyone have any thoughts?
October 10th, 2010 12:07am

You have to DECLARE @Year INTKalman Toth, SQL Server & Business Intelligence Training; SQL 2008 GRAND SLAM
Free Windows Admin Tool Kit Click here and download it now
October 10th, 2010 1:53am

Hi siera_gld, Did you define this parameter when you build this report? In BIDS, right click the Report Parameter folder in the data pane and create a report parameter with Integer data type, then in the dataset query parameter, map the sp paremter with this new defined parameter. please let us know if you have more questions,. thanks, Jerry
October 12th, 2010 10:13am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics