Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sun, 21 Dec 2003 @ 13:26:08 GMT


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


Subj:   Re: Suggestions for checking whether table exists or not
 
From:   Ferry, Craig

Since you are dropping it, I'm assuming it is a real and not a volatile table.

I do the following in my bteq scripts for this purpose.

SELECT *
FROM dbc.tables
WHERE databasename = 'my_database'
AND tablename = 'my_table';

.IF ACTIVITYCOUNT = 0 then .GOTO CONTINUE

DROP TABLE my_database.my_table;

.LABEL CONTINUE

CREATE TABLE my_database.my_table....


     
  <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: 15 Jun 2023