Sql job invoking sp_makewebtask --ending up failure [SQLSTATE 42000] (Error 16805)

  • I am creating a sql job which has the code mentioned under to be executed..

    EXEC sp_makewebtask @outputfile = 'c:\shared\DATABASE_NAME.xls',@query = 'SELECT MAX(LOGIN_DATE)LAST_LOG_DATE,LOG_USER FROM USER_LOGIN_TRACK GROUP BY LOG_USER HAVING DATEDIFF(day,MAX(LOGIN_DATE),getdate())>90',@username ='corp\ss250197',@dbname='GSLFINAL'

    This is ending up with a job failure error which is Could not execute the SQL statement.

    [SQLSTATE 42000] (Error 16805) Associated statement is not prepared [SQLSTAT

    When I execute the same statement into Query Analyzer , it works good.

    Also tried handling this with sa as usernane in the job configuration window. But the same error is occuring.

    Any help.

  • Any Help to the above problem..

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

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