problem with sql job and datetime parameter

Posted by geoff swartz on Stack Overflow See other posts from Stack Overflow or by geoff swartz
Published on 2010-04-23T17:04:38Z Indexed on 2010/04/23 17:23 UTC
Read the original article Hit count: 333

Filed under:
|
|

Another developer created a stored procedure that is set up to run as a sql job each month. It takes one parameter of datetime. When I try to invoke it in the job or in just a query window I get an error "Incorrect syntax near ')'" The call to execute it is...

exec CreateHeardOfUsRecord getdate()

When I give it a hard coded date like

exec CreateHeardOfUsRecord '4/1/2010' it works fine. Any idea why I can't use getdate() in this context? Thanks.

© Stack Overflow or respective owner

Related posts about sql

Related posts about jobs