Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to export data from one table, then load it in another ???
Sergei Didur wrote:
> =
> Hi everybody !
> =
> Is it possible to export data from one table and store it in file (on d=
isk
> or tape),
> then import it (from disk or tape) to another table within the same use=
r
> schema ???
> =
> Thanks in advance,
> Sergei Didur
When you do an export the tables structures are store then, at importing, the import utility attempts to create the table and after insert the rows. So I'm afraid it's not useful for you.
I think it would be better for you to execute the SQL statement: CREATE TABLE <NEW TABLE> AS SELECT * FROM <OLD_TABLE> =
{WHERE <CONDITION SEARCH>};
This way the names of the columns of the new table are the same than
than the old table's.
Other way, you can create the new table with different column names and
execute:
INSERT INTO <NEW TABLE> SELECT * FROM OLD TABLE;
You should define the new table's columns in the same order than the old
table.
Regards
-- =
Julio Negueruela
Telf: 941-299177 Fax: 941- 299244
Servicio Inform=E1tico
Universidad de La Rioja - Spain
mailto:julio.negueruela_at_si.unirioja.es
Received on Mon Dec 01 1997 - 00:00:00 CST