Home » RDBMS Server » Server Administration » SQL statement
SQL statement [message #374477] Thu, 14 June 2001 04:56 Go to next message
Claudio Beretta
Messages: 5
Registered: February 2001
Junior Member
I've create this statement to select all the table I'll need to import from one schema to another one.
The prolem is that the results of this statement is in a column, can you help me in refine my query to put the result in string like this Table1,Table2,Table3,etc.

This is my sql statement
select ' ' || TABLE_NAME || ','
FROM ALL_ALL_TABLES WHERE OWNER='TESTDTA'
AND TABLE_NAME IN (SELECT TABLE_NAME FROM ALL_ALL_TABLES WHERE OWNER='PRODDTA');

Many Thanks
Re: SQL statement [message #374487 is a reply to message #374477] Thu, 14 June 2001 10:08 Go to previous message
kavithask
Messages: 34
Registered: March 2001
Location: London
Member
Hi,

If you want the list of tables concatenated into a string, the easiest method would be is to use PL/SQL and concatenate it into a single variable and then use the variable.

HTH
Kavitha
Previous Topic: Execute a file in server with ORACLE
Next Topic: Procedure
Goto Forum:
  


Current Time: Mon Dec 23 14:07:17 CST 2024