|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 2/23/2007 12:39:00 PM
Posts: 1,
Visits: 1
|
|
I am new to the treadata environment, and would like to delete tables in my work environment (temporary work space) For example drop table s_mrktng.cletang_1486386770; drop table s_mrktng.cletang_1486409292; drop table s_mrktng.cletang_1486409363; drop table s_mrktng.cletang_1486409456; drop table s_mrktng.cletang_1486409527;
but instead of type the file name over and over can i do drop table s_mrktng.cletang_1486* ;
If * is not the wild card is there one that i could use.
Thanks
Transforming Data into Insight
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 8/24/2008 2:47:14 PM
Posts: 425,
Visits: 398
|
|
There's a quick trick which DBAs normally use to generate all those drop statements.
SELECT 'DROP TABLE ' || TRIM(DATABASENAME) || '.' || TRIM(TABLENAME) || ';' FROM DBC.TABLES WHERE DATABASENAME='s_mrktng' AND TABLEKIND = 'T' AND TABLENAME LIKE 'cletang_1486%';
Then copy paste and run those outputs.
Of course some get further creative by writing scripts to export the above output via bteq and run it again from bteq and so on ...
but I think this is sufficient to serve your purpose.
|
|
|
|