473,484 Members | 1,653 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

1 New Member
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_Sold, Master.Account, Master.Invoice, Master.Sold_Price, 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_Sold, Master.Account, Master.Invoice, Master.Sold_Price, Master.Core, Master.Warranty, Master.Lead, Master.Sold
FROM Master
WHERE (((Master.Sold)="Yes"));
Aug 20 '10 #1
0 876

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

Similar topics

3
7800
by: Maria | last post by:
Is there another way to delete the current record in a subform from the main form, another subform or a sub-subform other than setting focus on a field in the subform and using run command...
4
7828
by: Susan Bricker | last post by:
I have a command button on a form that is supposed to Delete the record being displayed. The record is displayed one to a form. The form is not a Pop-Up nor is it Modal. Tracing the btnDelete...
1
4279
by: travismorien | last post by:
I have four tables of different "entities". One table contains information for "people", one for "trusts", one for "companies" and one for "self managed super funds". Each type of entity has an...
3
3346
by: Darin | last post by:
This is something that on the surface seems like it should be simple, but I can't think of a way to do this. I have a table that is a list of "jobs", which users create and use. It has a single...
2
1545
by: MLH | last post by:
DELETE tblPreliminaryVINs.* FROM tblPreliminaryVINs INNER JOIN tblVehicleJobs ON tblPreliminaryVINs.PVIN = tblVehicleJobs.SerialNum; The above SQL does not work for me. I get an error I cannot...
4
7347
by: Akinyemi | last post by:
I am currently using Visual Basic 6 to write a Payroll Program. I created a Database with one Table in Microsoft Access that ships with Office 2000. The name of the Database is "Payroll", and the...
2
2878
by: Hph | last post by:
I have a repeating problem that I have been able to fix in the past only one way. I get a record that turns from 'english' to "foreign symbols" and then I cannot edit or delete that record. The...
3
2501
by: blakerrr | last post by:
Hi All, I have a strange situation that I can't figure out. The task is quite simple, delete a record from a table. Here is my situation: I have a form called Order Create which cycles through...
3
1889
by: Constantine AI | last post by:
Hi i am trying to DELETE a Record if the details do not exist within a table. Here is my code below; Dim strSQL As String Dim strSQL2 As String Dim Reply As String Dim db As...
10
1770
by: hedges98 | last post by:
Hello After spending my morning search for a solution to what I need to do, I am a little stuck on which direction to take. Here is the scenario - I have a database that contains information...
0
7083
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6954
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7146
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7226
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4531
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3047
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3042
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
592
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
237
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.