A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
Basically you need to do this ina transaction. Then use an insert into statement to insert data from table 1 to table 2, then delete the records from table 1, and then commit the transaction. An example
Begin Transaction
Insert into Outbox_1 (field1, field 2......) SELECT (field1, field2......) FROM OUTBOX WHERE DT_INSERT >= DATEADD(DAY, -30, GETDATE());
Delete FROM OUTBOX WHERE DT_INSERT >= DATEADD(DAY, -30, GETDATE());
Commit;
Hope this helps