Error Messages

  • DBA_Oshvegas

    SSC Enthusiast

    Points: 116

    I am getting two different messages from this procedure. If I run the job I get this error, " Incorrect syntax near '%'. [SQLSTATE 42000] (Error 102)."

    If I run the select statement in a query window, I get this one, "Only one expression can be specified in the select list when the subquery is not introduced with EXISTS".

    Here is the query from the job that is flagging these errrors:

    @query = 'select logdate, procInfo, ERRORLOG from tempdb.dbo.ErrorLog where Id >= (select TOP 1 Id from tempdb.dbo.ErrorLog WHERE ERRORLOG Like ''%Deadlock encountered%'' order by Id DESC)',

    I am running this on SQL2005.

    Any ideas?

  • DBA_Oshvegas

    SSC Enthusiast

    Points: 116

    Please delete, posted in wrong area.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply