I have a database, and sometimes it's necessary to move a record from one table to another. I'd like to find a way to (within AccesSQL) to perform the following actions (within 1 query)...
Select a record from table A based on user input. Accept input from the user for two other fields to be used later.
Create a record in table B with 3 values from the record in table A. Add the additional info that was input by the user into the record in table B.
Delete that record from table A.
I'd like to do this in one query... here's what I have so far, and this works like a charm, but I can't figure out how to delete the record at the end of the process:
Expand|Select|Wrap|Line Numbers
- PARAMETERS SN Text ( 255 ), RetTracking Text ( 255 ), RetDate Text ( 255 );
- INSERT INTO ReturnedToCorp ( [ST/SN], Manf, Model, Tracking, RDate )
- SELECT [ST/SN], Manf, Model, RetTracking, RetDate
- FROM Assets
- WHERE Assets.[ST/SN] = SN;
Thx in advance!