View Single Post

   
  #1 (permalink)  
Old 02-28-2008, 08:14 AM
Lee Peedin
 
Posts: n/a
Default Accomplish 2 tasks in one pass

Just wondering if it is possible to perform these 2 steps in one pass.


(Step 1 - create an "achive table" and select all rows that meet
"mycondition")
create newtable select * from oldtable where mycondition

(Step 2 - delete the "archived" records from the oldtable)
delete from oldtable where mycondition

The idea is to create an archive "newtable" and remove the archived
data from "oldtable" in one pass.

Thanks
Lee
Reply With Quote