Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Mon, 16 Sep 2002 @ 13:57:55 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


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.



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 28 Jun 2020