Bulk Insert Return Value

  • I want to know if the BULK INSERT TSQL can be modified to create a return code of success or failure in the SQL Server job. I want the graphic of the job to display succeed or fail so that I can quickly and easily respond to a job failure.

    Currently, I use bcp to move data file data into tables in a SQL Server database. The SQL server job launches a batch file to do this. I direct the results of the bcp to an output file which I then can check. Without this output file the bcp embedded in the batch file may not clearly display success or failure at the level of the sql server job.

  • Havent tried it, but what about If @@Error= 0 Return 1 Else Return 0 after the BULK INSERT statement

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

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