Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I create an Append Query in SQL?

Status
Not open for further replies.

jcfrasco

IS-IT--Management
Apr 27, 2001
89
US
I've created a number of append queries in Access where I import the data of a template table into my primary table and then run an update query to set a certain field to a control number. Now that I've started building my databases in SQL Server 7 I would like to perform the same functions. How do I create an append query and an update query like in Access?
 
Here's a simple append in SQL:

INSERT INTO KRONOS ( Location, Employee, Resolved )
SELECT Projects.Location, Projects.Name, Projects.[Complete Date]
FROM Projects;

and update:
UPDATE Projects, KRONOS SET Projects.Location = "Not Found", KRONOS.Action = "Not Resolved"
WHERE (((Projects.Location) Is Null) AND ((KRONOS.Action) Is Null));

kerri
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top