mcrmg
asked on
Passing parameters
Hi,
I have a sp that takes two dates as parameters. When I run it using two dates, exec my-sp '1/29/2018', '1/29/2018', it runs fine. But when I use this
Exec my-sp DATEADD(day, DATEDIFF(day,0,GETDATE())- 1,0),DATEA DD(day, DATEDIFF(day,0,GETDATE())- 1,0)
it shows the error
Incorrect syntax near 'day'.
I am not sure where the problem is. thanks
I have a sp that takes two dates as parameters. When I run it using two dates, exec my-sp '1/29/2018', '1/29/2018', it runs fine. But when I use this
Exec my-sp DATEADD(day, DATEDIFF(day,0,GETDATE())-
it shows the error
Incorrect syntax near 'day'.
I am not sure where the problem is. thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER