Archives of the TeradataForum
Message Posted: Mon, 16 Sep 2002 @ 13:57:55 GMT
Subj: | | Re: Drop the table |
|
From: | | Narayan Murthy K S |
You are looking for something like an "UPSERT" statement ie. "Update if present else insert" - As far as i know there isn't anything
which is close to what you are looking for(using SQL) "Drop if present else Create" - If you were to use the BTEQ client then you could do
something like :
DROP TABLE
.IF ERRORCODE = 3807 then Create table .....
3807 is error code returned by "Drop table " statement if a table/view/trigger/procedure is not present.
Narayan.
|