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
What is the primary index in teradata?
What do you mean by teradata intelliflex?
What is the difference between global temporary tables and volatile temporary tables?
what is object level locking ? where do appear this type of locking ?
How to identify ppi columns?
What are the steps to create a data model?
What is spool space and when running a job if it reaches the maximum spool space how you solve the problem?
What is TPD?
Can any one explain me the difference between BTEQ and MLOAD,TUMP. All canbe used for same purpose but still differnt methods. why ?
if collect stats but it show low confidence why?
tomorrow i have interview in infosys.can someone pour any suggestions or any interview questions. thank you
What are the components provided on node?
What is difference between user and database in teradata?
Highlight the points of differences between the database and user in Teradata.
Hi, If anyone has TD 14 Basics dumps or study materials, please share. nirmaaal1991@gmail.com