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 are the available join types in teradata?
Describe the between keyword in teradata?
Comment whether bottleneck is an error or not.
What is the use of virtual processor connectivity in teradata?
Did you write stored procedures in teradata?
In the Primary Index, what is the score of AMPs that are actively involved?
What do you mean by ttu in teradata?
What is smp and mpp platforms?
why use references rather than pointers in the public api, particularly for arguments which are modified?
What are the various indexes in teradata? Why are they preferred?
If RDBMS is halted what will you do ?
What are the things to be considered while creating secondary index?
Explain vproc in teradata?
What is called partitioned primary index (ppi) and discuss the advantages of using it in a query?
What is the multi-insert?