|
-
May 28th, 2007, 01:13 AM
#1
Incorrect use of dateadd() function
Hi guys,
I have a stored procedure which has a datetime parameter. But when I call it like this:
exec spSomething dateadd(minute, 30, getutcdate())
It complains as "Incorrect syntax near 'minute'.
But when I call it like this:
declare @time datetime
set @time = dateadd(minute, 30, getutcdate())
exec spSomething @time
Everthing is OK. Why? Can you help me on this?
Thank you !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|