Want to remove sql Exception number in logfile.txt

  • Hi,

    i am using sql server 2005 , i made sql job to print the result in log file, its working fine but in the result pane(log.txt) shown something exception number like [SQL State 0100]

    i want to get rid of this sql status

    pls help me

    Job 'inventroyjob' : Step 1, 'Step1' : Began Executing 2009-05-31 12:33:21

    Serverinformation DETAIL LOG [SQLSTATE 01000]

    -------------------------------------------- [SQLSTATE 01000]

    total number of Serial Number for Inventry table are: 95 [SQLSTATE 01000]

    total number of location from inventory table are: 648 [SQLSTATE 01000]

    total number of Ipaddress for inventory table are: 111 [SQLSTATE 01000]

  • Hello,

    I guess you are using Print statements to generate the total lines? Try using Selects instead, it may help. Have a look at the following sample code:-

    Set NoCount On

    Declare @Total1 VarChar(10), @Total2 VarChar(10)

    Select @Total1 = 95, @Total2 = 648

    Print 'Test Will Get a SQLState Message after this text '

    Select 'total number of Serial Number for Inventry table are: ' + @Total1

    Union

    Select 'total number of location from inventory table are: ' + @Total2

    Regards,

    John Marsh

    www.sql.lu
    SQL Server Luxembourg User Group

  • Hi Jhon

    its wonderfull thing , now i got the desired result

    thank you so much for this efforts.

    Regar

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

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