Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Mention the procedure via which, we can run Teradata jobs in a UNIX environment.

1040


Can we collect statistics on multiple columns?

1129


What are the various etl tools in the market?

1124


What are the different methods ot loading a dimension table? A fact table etc?

1085


How to explain project Architecture and flow in teradata interviews?Can please anyone help on this? Am new to teradata.

4425


What is the use of stored procedures in teradata?

1047


What are the different table types supported by teradata?

1021


Explain and compare pros and cons of start schemas?

1152


What is the multi-insert?

1084


Backup Script was blocked then you are unable to archive the data. how do you analyze it and where do you identify ?

2004


Is it necessary to add? Quit statement after a bteq query when I am calling it in a unix environment?

1321


What is the difference between teradata and oracle?

1068


What are the multiload utility limitations?

1115


What are the functions of a Parser?

1190


What is the function of parser component in teradata?

1135