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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 [SQLSTATE 42000] (Error 102) when running a job

Author  Topic 

jamie
Aged Yak Warrior

542 Posts

Posted - 2007-11-14 : 11:12:00
Hi,
when I execute a sql script in sql studio it works correctly, but when I take that same script and add to a job I get the following error :
Message
Executed as user: NT AUTHORITY\SYSTEM. Incorrect syntax near '0'. [SQLSTATE 42000] (Error 102) Incorrect syntax near '0'. [SQLSTATE 42000] (Error 102) Incorrect syntax near 'termination_points'. [SQLSTATE 42000] (Error 102) Incorrect syntax near 'drop_points'. [SQLSTATE 42000] (Error 102) Incorrect syntax near '0'. [SQLSTATE 42000] (Error 102) Incorrect syntax near '0'. [SQLSTATE 42000] (Error 102) Incorrect syntax near '0'. [SQLSTATE 42000] (Error 102). The step failed.

Why would this happen ? Even when I parse the sql in the job it comes back saying it is ok..

regards,
Jamie

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-11-14 : 11:13:09
Where is the script?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

jamie
Aged Yak Warrior

542 Posts

Posted - 2007-11-22 : 09:46:35
hi, the query is over 500 lines long.
and in the error it doesn't give the line number.
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2007-11-22 : 09:48:46
Without the script, there is no way we can tell you where the error is. We can tell you that you have a few syntax errors. :D
Go to Top of Page
   

- Advertisement -