![]() |
|
Archives of the TeradataForumMessage Posted: Fri, 28 Jan 2011 @ 12:43:46 GMT
Hi ALL, Please help me for the below scenario. I have many sqls under one BTEQ script and when any of the sql fails in between, all the transactions to be rollback completely. I am using BTET (DEFAULT) mode. i need more info on this. Example Code:
.logon ${PTD_TDP}/${PTD_DB_USER},${PTD_DB_PASSWD};
DELETE FROM Table1;
.if errorcode <> 0 then .goto EXIT_ERROR
DELETE FROM Table2;
.if errorcode <> 0 then .goto EXIT_ERROR
DELETE FROM Table3;
.if errorcode <> 0 then .goto EXIT_ERROR
DELETE FROM Table4;
.if errorcode <> 0 then .goto EXIT_ERROR
.quit 0
.label EXIT_ERROR
.remark '*** Error detected in BTEQ scipt ***'
.quit 99
Thanks Naveed
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||