Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i copy data to another empty table...

Status
Not open for further replies.

GoSooJJ

Programmer
Feb 24, 2001
76
US
hi all,
i just moved access database to oracle and realized that all tables and column names are changed to &quot;<table name>&quot; and &quot;<column name>&quot;. They added double quotes. Because of this, I created script to create new empty tables. New empty tables are same as old one except their data type.
Now, i want to know how can I copy one table data to another table. I'm using Toad application for this...
Can anyone help?
thx...
JJ //
 
Here are several possible solutions.

1). INSERT INTO <new_empty_table> (<column1, column2)
SELECT *
FROM <old_table>;

Another solution.

2). Quick solution. Export the data in the <old_table> into a delimited file like comma. Write a control_file and use SQL*Loader to load the data into the <new_empty_table>.

If you need some more guidance let me know. Hope this helps.

jbitzan
 

Another solution is to create the tables directly;

CREATE TABLE new_table
AS SELECT * FROM old_table;

Robbie

&quot;The rule is, not to besiege walled cities if it can possibly be avoided&quot; -- Art of War
 
jbitzan,
thx.

In fact, i used first method to solve my prob. It took some time to over all of them tables. ^^
thx again.
JJ //
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top