How to get job to show errors from stored proc

  • I have a stored procedure that does raises an error if data does not match up using the following:

    RAISERROR ( 'ERROR: boo',

    1, -1 )

    This works fine. However, when i execute the proc from a SQL Job, the job shows success and 0 errors even if this error is encountered. Does anyone know how I can make the job show this error?

  • figured it out - this will get error to show:

    RAISERROR ( 'ERROR: boo',

    16, 1 )

    RETURN @@ERROR

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

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