October 8, 2002 at 10:49 am
I run a batch job which contains multiple BCPs. The syntax I use is :
bcp xxx_yyyy.dbo.table1 in f:\aaaaa\rm_bbbbb.txt -e err_bbbbb.txt -U "xxx_dbo" -P "xxx_dbo" -m 10 -b 1000 -c -t"|" -S "SERVER NAME" -o bcp_bbbbb.txt
bcp xxx_yyyy.dbo.table2 in f:\aaaaa\rm_ccccc.txt -e err_ccccc.txt -U "xxx_dbo" -P "xxx_dbo" -m 10 -b 1000 -c -t"|" -S "SERVER NAME" -o bcp_ccccc.txt
When the batch is executed by autosys the two BCPs execute one after the other. Due to some reason if the 1st BCP fails, the 2nd BCP is triggered and the failure of the BATCH job is not trapped. Is there any way I can capture the error from the first BCP and prevent the 2nd BCP from triggering and the entire BATCH job should abort?
October 29, 2002 at 8:00 am
This was removed by the editor as SPAM
October 29, 2002 at 4:15 pm
Putting the Go word after the second bcp?
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply