Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie: Move Data From One Table To Another

Re: Newbie: Move Data From One Table To Another

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Wed, 8 Sep 2004 20:43:16 -0400
Message-ID: <nqqdndb2W6-1OqLcRVn-rw@comcast.com>

"Jeff" <bass2ply_at_sbcglobal.net> wrote in message news:f6f199f0.0409081524.4dead345_at_posting.google.com...
| I have two tables: a transaction table and a transaction history
| table. At the end of the year, I would like to move the data from the
| trans table to the hist table via VB .Net. What would be the best way
| to perform this function using an Oracle statement? Is there a
| statement that I could run stating select all from Table A and move to
| Table B?

|
| Any help would be appreciated. Thanks in advance!

in general, you need to do an INSERT INTO <histable> ( <columnlist> ) SELECT <columnlist> FROM <table> WHERE <conditions> then do a DELETE of the same rows from the transaction table

doesn't need to be done with VB .Net -- the statements can be called from any Oracle interface

how many rows do you anticipate? what version of oracle? depending on your oracle version and database configuration you may have to deal with rollback segment issues

++ mcs Received on Wed Sep 08 2004 - 19:43:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US