Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Msg 102, Level 15 when calling a procedure

Author  Topic 

ozSQLServer
Starting Member

32 Posts

Posted - 2011-12-21 : 20:41:53
Hi all,

What's wrong with my simple code below?

use mydb
go

CREATE PROCEDURE SA.MYCUR1
@PDATE DATETIME2
AS
DECLARE @VORDER_ID [numeric](12, 0) ;

Command(s) completed successfully.


EXEC SA.MYCUR1 @PDATE=sysdatetime()

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ')'.


Cheers,
ozSQL

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2011-12-21 : 20:46:47
[code]
declare @sysdate datetime2

select @sysdate = sysdatetime()
EXEC SA.MYCUR1 @PDATE = @sysdate
[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

ozSQLServer
Starting Member

32 Posts

Posted - 2011-12-21 : 20:50:46
cool,
Thanks!

Cheers,
ozSQL
Go to Top of Page
   

- Advertisement -