|
-
Dec 9th, 1999, 01:38 AM
#1
Thread Starter
Member
Hi Everyone,
I have a database with multiple tables. All tables are identical in structure, and the inforamtion that they could possibly contain.
My question is this. How can I move a group of records from all the tables at once, by simply having a user enter a beginning criteria, and an ending criteria (i.e. Date). I have no problem getting everything to move at once, but I want to be able to move select records from each table to another table at one time.
Any suggestions that don't involve rewriting half of my code?
Thanks!
-
Dec 9th, 1999, 10:51 AM
#2
Your code will probably look something like this:
BEGIN TRANSACTION
INSERT INTO Table3
SELECT *
FROM Table1, Table2
WHERE DATE BETWEEN BeginDATE AND EndDATE;
DELETE FROM Table1, Table2
WHERE DATE BETWEEN BeginDATE AND EndDATE;
END TRANSACTION
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|