Hi in a stored procedure I want to select rows that are in an interval of a month where @Anno is the year of the start and @Mese is the month of the date start. I try this:
WHERE FinePeriodo >= CAST((@Anno + '-' + @Mese + '-01 00:00:00') as datetime)
AND FinePeriodo <
DATEADD(month, 10, CAST(
(@Anno + '-' + @Mese + '-01 00:00:00') as datetime))
But it doesn't work.
How can I do?
thanks