Thursday, 25 October 2012

You are calling a Bteq script, which drops a table and creates a table. It will throw an error if the table does not exist. How can you do it without throwing the error?

You can it by setting error level to zero before dropping and resetting the error level to 8 after dropping.
You can do it like this
ERRORLEVEL (3807) SEVERITY 0;
DROP TABLE EMPLOYEE;

No comments: