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
How to identify ppi columns?
Highlight a few of the important components of Teradata?
Explain fallback in teradata?
During the Display time, how is the sequence generated by Teradata?
What is the function of parser component in teradata?
What is dimensional modeling?
Can any one explain me the difference between BTEQ and MLOAD,TUMP. All canbe used for same purpose but still differnt methods. why ?
What is bteq script in teradata?
What are the different methods ot loading a dimension table? A fact table etc?
Backup Script was blocked you are unable to archive the data now. how do you analyze it and where do you identify ?
How do you verify a complicated sql?
Explain the teradata primary index mechanics in detail with a diagram.
What is the use of virtual processor connectivity in teradata?
What are the different table types supported by teradata?
What are the uses of client software involved in teradata?