RE: moving records between tables?

2004-07-08 Thread darren
to move the record to archive_table and add in two more fields? -Original Message- From: darren [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 07, 2004 11:44 PM To: [EMAIL PROTECTED] Subject: moving records between tables? Hi all, I have 2 tables...one for keeping active items while

RE: moving records between tables?

2004-07-08 Thread SGreen
to: | | Subject: RE: moving records between tables

moving records between tables?

2004-07-07 Thread darren
Hi all, I have 2 tables...one for keeping active items while the other is for older records. A housekeep program will come in every night to move some records (matching several criteria from the active table to the history one. I am currently doing SELECT, INSERT and then DELETE. i.e. a select

Re: moving records between tables?

2004-07-07 Thread gerald_clark
darren wrote: Hi all, I have 2 tables...one for keeping active items while the other is for older records. A housekeep program will come in every night to move some records (matching several criteria from the active table to the history one. I am currently doing SELECT, INSERT and then DELETE.

Re: moving records between tables?

2004-07-07 Thread Justin Swanhart
LOCK TABLE active_table WRITE, history_table WRITE; #assuming the columns in the tables are exactly #the same insert into history_table select * from active_table; delete from active_table; UNLOCK TABLES; if the columns aren't the same between the tables then you need to do something like