in a BTEQ we have 2 insert 2 del 2 update statment.
when the BTEQ is restarted i need to run the BTEQ from
after DEL statment(means no need to run the insert & del
stat).what is the logic for the above requirement?
Answer Posted / aarsh dave
Create an empty file before each set of DML statements.
Write the BTEQ as below:
bteq << EOF
.logon tdpid/user,password;
.OS if [-f bteq_restart.txt];then else {touch bteq_restart.txt};
.run file bteq_restart.txt;
.label INSDML;
INSERT STATEMENT 1;
INSERT STATEMENT 2;
.IF ERRORCODE <> 0 THEN .EXIT ERRORCODE;
.label DELDML;
DELETE STATEMENT 1;
DELETE STATEMENT 2;
.IF ERRORCODE <> 0 THEN .EXIT ERRORCODE;
.IF ERRORCODE <> 0 THEN .OS echo '.GOTO UPDTDML' >
bteq_restart.txt;
.LABEL UPDTDML;
UPDATE STATEMENT 1;
UPDATE STATEMENT 2;
.IF ERRORCODE <> 0 THEN .EXIT ERRORCODE;
.OS rm -f bteq_restart.txt;
.EOF
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Hi Friends, Please send me Teradata Materials for certifications Thanks in advance !!
What is a dimension table?
What is the multi-insert?
Explain vproc in teradata?
What are the uses of bynets in multi-node systems?
Describe primary index in teradata?
What is the basic syntax for teradata select statement?
How is MLOAD Client System restarted after execution?
What are the components provided on node?
Explain teradata utilities. What is multiload, fast load, tpump?
What are teradata utilities?
What are the enhanced features in teradata v2r5 and v2r6?
What is the use of teradata system software?
What are the functions of a teradata dba?
Discuss the advantages of using partitioned primary index in a query?