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
Printable View
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
Remember to insert record in table first, and then delete from original.
If it's an Access DB:
In SQL I belive there is SELECT INTO statement that allows you to copy data from one table to another with the same structure.Code:INSERT INTO Table2
SELECT Table1.*
FROM Table1
WHERE (((Table1.ID)=2));
Andreys, I copy your code and it works in SQL too. Thanks