...wanted a SQL query [message #22969] |
Thu, 07 November 2002 14:44 |
raman
Messages: 66 Registered: February 2000
|
Member |
|
|
A user sent me 350 junk tables in Excel(under one column, 350 rows) which are to be deleted from a schema, and I should need a query to do that.
All I know is, using the following query:
Select 'delete table 'table_name';' from user_tables where table_name in (350 tables - cut & paste from Excel);
My question is: how to put each table in single codes with commas in the above brackets, rather than manually doing?
I would really appreciate your help
-Raj
|
|
|
Re: ...wanted a SQL query [message #22970 is a reply to message #22969] |
Thu, 07 November 2002 15:38 |
Todd Barry
Messages: 4819 Registered: August 2001
|
Senior Member |
|
|
On the row of the first table in the spreadsheet, put this formula in the column to the right of the table (if the table_name is in A1, put this in B1):
and then copy the formula down. Then you can highlight the results in column B and paste into your SQL query. You'll have to remove the column from the last table result.
|
|
|