I have a report that I need to show the four quarters plus a Year To Date (YTD). I am getting a Conversion failed when converting the varchar value 'YTD' to data type int error and need some help. See first code & output. I used this same for a 12 month
& YTD report and it works fine - see second code and output- any help is appreciated
First code
DECLARE @ID Int
DECLARE @BD Datetime
DECLARE @ED Datetime
DECLARE @RptMonth Datetime
SET @ID = '1038'
SET @BD = '01/01/2010'
SET @ED = '12/01/2010'
SET @RptMonth = '07/01/2010'
CREATE TABLE #PreviousYR(
Datasource_ID int, Actual_YTD float
)
View Complete Post