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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you move data from one table to another without using a form 1

Status
Not open for further replies.

duns

Programmer
May 22, 2000
13
0
0
AU
I have two tables each of the same format. I need them to be sseparate as they deal with forms at different stages of their life cycle. <br><br>Now I want to be able to move data from one table to another<br><br>Any ideas??
 
You can make an INSERT statement like this:<br>INSERT into table_A SELECT * FROM table_B;<br>followed by a COMMIT statement, of course :) <p>Eduard Stoleru<br><a href=mailto:e_stoleru@yahoo.com>e_stoleru@yahoo.com</a><br><a href= > </a><br>
 
I think you may want to be more specific but try this: -<br><br>insert into second_table<br>select *<br>&nbsp;&nbsp;from first_table<br>&nbsp;where value = value;<br>delete from first_table<br>&nbsp;where value = value;<br>commit;<br><br>Make sure to commit after the second query, if the job falls over it will rollback to the start thus avoiding having duplicate data accross the tables; <p>Ged Jones<br><a href=mailto:gedejones@hotmail.com>gedejones@hotmail.com</a><br><a href= > </a><br>
 
can we use the same statement to trasfer data from say Oracle table to Access?
 
Probably....<br><br>Define the Oracle table in Access by Attaching it as an external table you can then, except for design, treat it as more or less an Access table. <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>Please -- Don't send me email questions without posting them in Tek-Tips as well. Better yet -- Post the question in Tek-Tips and send me a note saying "Have a look at so-and-so in the thingy forum would you?"
 
Thanks Ged you answered my question<br>so I gave you a blue star!!!!<br><br><A HREF=" TARGET="_new"> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top