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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append Query or Update or insert

Status
Not open for further replies.

amillia

Programmer
Nov 14, 2001
124
US
What is an append query and when would you use one? I need to update a table in a database with another table on a weekly basis. It will insert an addition 700 records every week. What kind of query do i need to use?
 
I believe that an append query and an insert query are the same thing. An update query changes information that is already in the table:

UPDATE tblName SET someField = "SomeValue" Where SomeCondition = "Something"

There are two ways to write insert queries. The first explictly declares all the fields. The second assumes that all the fields in the query are the same as the fields in the table they are being inserted into.

INSERT INTO tblName (Field1, Field2) Values ("Something", "Something Else")

or

INSERT INTO tblName
SELECT * From tblOtherName


HTH



Leslie
 
I have a similar issue. I have updates, but within the records.

Ie I have a list of people and some of their info gets updated, then someone else sends the list of just their names and has updates of other info.

Problem is that if I updated someones address, and that is in the master list, I cant seem to bring in an update that doesnt have that add update, but has others. If I do it "erases" that address that was updated in the master list because the 2nd update list didnt have anyhting in that.

How do I just take additions, not deletions?
is this making sense?
If not I will re-explain..
lol


misscrf

Management is doing things right, leadership is doing the right things
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top