Try the code i posted just replacing 'C917348' and 'ACCT_BASE'.
You could also uncheck "Stop query execution if an SQL error occurs" in Options -> Query and then simply run your DELETE or DROP/CREATE tables, errors will be ignored then. When you don't want to ignore errors in other places of your script you must use IF ERRORCODE:
DELETE FROM tab;
INSERT INTO tab SELECT FROM tab2;
.IF ERRORCODE <> 0 THEN GOTO failed;
DELETE FROM tab3;
INSERT INTO tab3 SELECT FROM tab4;
.IF ERRORCODE <> 0 THEN GOTO failed;
etc.
.EXIT 0
.LABEL failed
.EXIT 1btw, i just noticed that my link was dead:
http://developer.teradata.com/node/828
Dieter
↧