By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,397 Members | 1,467 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,397 IT Pros & Developers. It's quick & easy.

Multi-level Access SQL query:

P: 6
Stupid question...

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
  1. PARAMETERS SN Text ( 255 ), RetTracking Text ( 255 ), RetDate Text ( 255 );
  2. INSERT INTO ReturnedToCorp ( [ST/SN], Manf, Model, Tracking, RDate )
  3. SELECT [ST/SN], Manf, Model, RetTracking, RetDate
  4. FROM Assets
  5. WHERE Assets.[ST/SN] = SN;
Anyone have any ideas?

Thx in advance!
Oct 11 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.