Click here to Skip to main content
15,914,014 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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:
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

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

Can anyone solve it?

Thanks!

-Pepin z Hané
Posted
Comments
skydger 25-Oct-12 1:23am    
What are the types of your 'Name' and 'Locality' arguments?
Pepin z Hane 25-Oct-12 9:05am    
It is written there Varchar (70), Varchar (55)

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[^]
 
Share this answer
 
Comments
Pepin z Hane 25-Oct-12 9:04am    
It didn't heplped.
It doesn't work with sysdatetime() or getdate(), but I don't need actual datetime. It is only testing query...

This works:
SQL
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
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900