The Select queries the system tables if the ACCT_BASE table exists
select 1 from dbc.TablesV where databasename = 'C917348' and TableName = 'ACCT_BASE';
.if activitycount = 0 then GoTo ok
drop table ACCT_BASE;
.label ok
create table ACCT_BASE(....)But this approach will not work when it's a Volatile Table, because VTs are not recorded in the data dictionary.
If all those tables are Volatile the easiest way would be to logoff and logon again, this will drop all VTs.
Dieter
↧