BTEQ - GOTO - Redirecting the control in Teradata

GOTO redirect the control to the label associated.

Sample Code:
.LOGON localtd/dbc,dbc

DATABASE forgetcode;
DELETE FROM tbl_employee;
.IF ERRORCODE=0 THEN .GOTO ins

.LABEL ins
INSERT INTO tbl_employee (1. 'Rose');

.LOGOFF
.EXIT


Explanation:
1. We login to BTEQ.
2. Deleting the records from tbl_employee table
3. If Delete operation is successful, then it will GO TO ins label.
4. ins will insert a record.
5. If Delete operation was not successful then logging off from bteq.