Hi,
I have store procedure which need to execute with different parameters like
beginning of month
Last two months data
..
create proc Results @date
as
Begin
select col1,col2 from table1
where date >= @Date
End
Now I need to pass parameters for this proc
as
Exec Results @Date = DATEADD(mm, DATEDIFF(mm, 0, GETDATE()) - 2, 0) -- For last two months data?
But I have error message Incorrect syntax ')'
Could anyone have any suggestion how to pass Date parameters value using getdate() function
Thanks