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

script to move records between tables

Status
Not open for further replies.
Jul 29, 2005
136
PT
Hello,

I need a script to move some records from one table to another table (an history table). I need then to delete the moved records from the original table. Both tables are at the same databases. The fields are the same and the history table doesn´t have any keys defined. To define the records to move, I just need to specify a date to a datetime fields.

Certanly I will need to put this sql instruction in a begin/commit transaction.

Any help would be appreciate.

Thank you
 
So what do you have so far? What problem are you running into?

"NOTHING is more important in a database than integrity." ESquared
 
A simple INSERT and then a DELETE WHERE should work. Any code you have so far would be helpful in answering your question.
djj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top