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

Appending Records

Status
Not open for further replies.

jlmeek

Technical User
Jan 30, 2001
13
US
I have two tables:
tblbib
tblcoverage

I want to apphend a column (estimatedvolumes) from tblcoverage to tblbib where tblbib.issn = tblcoverage.issn.

I created the column in tblbib prior to running the append query. I dropped column estimatedvolumes into the append query - click run (because when I look at the SQL it looks like it's matching based on ISSN's automatically. The dialog box reads "you are about to append 313 rows. Do you want to run?" Click yes, then a message appears telling me that I cannot append 313 rows because of key violations. Any suggestions?
 
Hi!

What you want is an update query not an append. Append queries add records and update queries change records.

hth
Jeff Bridgham
 
Thank you, Thank you, Thank you. I started to ask how would I write the SQL, but I figured it out during the typing process.

UPDATE tblbib, tblcoverage
SET tblbib.EstimatedVolumes = tblcoverage.EstimatedVolumes
WHERE tblbib.ISSN = tblcoverage.ISSN;

Thanks again,
jessica
 

I think you want to do an UPDATE query rather than an APPPEND query. You want to UPDATE the value of a column in an existing record. APPEND will try to add new records. Terry L. Broadbent
Life would be easier if I had the source code. -Anonymous
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top