|
-
Jan 22nd, 2003, 04:47 PM
#1
Thread Starter
Hyperactive Member
-Sovled --What way to delete a record and use that record to add into another table ?
I have an ASP page and I want to delete a record based on ID number from table 1 and I also need to save that record at table 2. How to do that without pulling out values to insert in table 2 before delete it ? Thanks
Last edited by learnervb; Jan 22nd, 2003 at 06:06 PM.
Tiny Mickey
-
Jan 22nd, 2003, 05:35 PM
#2
Frenzied Member
Remember to insert record in table first, and then delete from original.
If it's an Access DB:
Code:
INSERT INTO Table2
SELECT Table1.*
FROM Table1
WHERE (((Table1.ID)=2));
In SQL I belive there is SELECT INTO statement that allows you to copy data from one table to another with the same structure.
-
Jan 22nd, 2003, 06:05 PM
#3
Thread Starter
Hyperactive Member
Andreys, I copy your code and it works in SQL too. Thanks
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
|