Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Delete or Drop a table if it already exists - response (18) by koushiksaha83

$
0
0

Hi Dnoeth,
I tried using your code to in SQL assistance 12.0 but getting same error like others -
"Expected something between 'and'& 'table'.
 
Even after unchecking "Stop query execution if an SQL error occurs" I am getting the same error.
Below is the piece of code I am trying to execute. Pls help me to get rid of the syntax error.
select 1 from dbc.TablesV where database = d_temp_sas and table = 'ks_del_121_base_nov';
.if activitycount = 0 then GoTo ok
DROP TABLE ks_del_121_base_nov
.label ok
create table ks_del_121_base_nov as
(select * from mg_chck)
with data primary index(subscription_id);


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>