Append a record from one table to another. Then delete initial record

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • EvanA
    New Member
    • Aug 2010
    • 1

    Append a record from one table to another. Then delete initial record

    I am trying to move data from one table to another. I have 2 codes that work right now... One to copy the data I want from one table to the other and one to delete data from a table. Is there any way I can get this to work as one whole process or do I need to run these seperatly?

    INSERT INTO SoldMotors ( NTS, Make, Model, Grade, Date_Sold, Account, Invoice, Sold_Price, Core, Warranty, Lead )
    SELECT Master.NTS, Master.Make, Master.Model, Master.Grade, Master.Date_Sol d, Master.Account, Master.Invoice, Master.Sold_Pri ce, Master.Core, Master.Warranty , Master.Lead
    FROM Master
    WHERE (((Master.Sold) ="Yes"));

    and this is my delete.

    DELETE Master.NTS, Master.Make, Master.Model, Master.Grade, Master.Date_Sol d, Master.Account, Master.Invoice, Master.Sold_Pri ce, Master.Core, Master.Warranty , Master.Lead, Master.Sold
    FROM Master
    WHERE (((Master.Sold) ="Yes"));
Working...