消息102,级别15,状态1,第5行')'附近的语法不正确. [英] Msg 102, Level 15, State 1, Line 5 Incorrect syntax near ')'.
问题描述
我不知道我是盲人还是盲人,但是我无法解决愚蠢的语法.
我有一个过程Create_Tournament(@Name(Varchar(70)),@Locality(Varchar(55)),@Deadline_for_Registration(Datetime),@Begining(Datetime),@End(Datetime),@Category(Varchar),@Entry_Fee (int),@ Num_of_Teams(int),@ Extra_Groups_To_Create)
SQL:
Hi,
I don''t know if I am blind or what, but I can''t solve a stupid syntax.
I have a procedure Create_Tournament (@Name (Varchar(70)), @Locality (Varchar(55)), @Deadline_for_Registration (Datetime), @Begining (Datetime), @End (Datetime), @Category (Varchar), @Entry_Fee (int), @Num_of_Teams (int), @Extra_Groups_To_Create)
SQL:
01|Set statistics io on
02|execute Create_Tournament
03|'Juhász Beach Volleyball Tour 2012',
04|'Soběšovice',
05|sysdatetime(),
06|sysdatetime(),
07|sysdatetime(),
08|'Muži',
09|100,
10|8,
11|0
抛出:Msg 102,Level 15,State 1,Line 5'')''附近的语法不正确.
有人可以解决吗?
谢谢!
-Pepin zHané
throws: Msg 102, Level 15, State 1, Line 5 Incorrect syntax near '')''.
Can anyone solve it?
Thanks!
-Pepin z Hané
推荐答案
为什么不尝试使用GetDate()而不是SysDateTime? -此处的链接http://blog.sqlauthority.com/2007/06/21/sql-server-retrieve-current-date-time-in-sql-server-current_timestamp-getdate-fn-now/ [ ^ ]
或者,如果您仍想使用SysdateTime,请尝试- http://msdn.microsoft.com/en-us/library/bb630353.aspx [ ^ ]
Why dont you try using GetDate() instead of SysDateTime? - heres a link http://blog.sqlauthority.com/2007/06/21/sql-server-retrieve-current-date-time-in-sql-server-current_timestamp-getdate-fn-now/[^]
Or if you still want to use SysdateTime try - http://msdn.microsoft.com/en-us/library/bb630353.aspx[^]
它不适用于sysdatetime()或getdate(),但我不需要实际的日期时间.只是测试查询而已...
这有效:
It doesn''t work with sysdatetime() or getdate(), but I don''t need actual datetime. It is only testing query...
This works:
Set statistics io on
Execute Create_Tournament
'Juhász Beach Volleyball Tour 2012',
'Soběšovice',
'20100301',
'20100301',
'20100301',
'Muži',
100,
8,
0
-Pepin z Hane
-Pepin z Hane
这篇关于消息102,级别15,状态1,第5行')'附近的语法不正确.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!