ACC: Updating and Appending Records in One Update QueryID: Q127977
|
Novice: Requires knowledge of the user interface on single-user computers.
In Microsoft Access, you can use an update query to append unique new
records to a table as well as update existing records in the table. For
example, using two tables (Table1 and Table2) in an update query, you can
update older records in Table1 by using newer data from Table2 and append
any unique new records to Table1 from Table2.
NOTE: An update query can append and update records only if the tables
contain a unique index that does not have the AutoNumber data type (or
Counter data type in version 2.0).
The following example demonstrates how to update and append records in one
update query:
Field Name: ShipperID
Data Type: Number
FieldSize: Long Integer
Shipper ID: 1
Company Name: Ultimate Speedy Express, Inc.
Shipper ID: 4
Company Name: Super-Fast Delivery
Include ALL records from 'Shippers2' and only those records from
'Shippers1' where the joined fields are equal.
Field: ShipperID
Table: Shippers1
Update To: [Shippers2].[ShipperID]
Field: CompanyName
Table: Shippers1
Update To: [Shippers2].[CompanyName]
Field: Phone
Table: Shippers1
Update To: [Shippers2].[Phone]
For more information about update queries, search the Help index for "update queries."
Keywords : QryUpdat
Version : 2.0 7.0 97
Platform : WINDOWS
Issue type : kbinfo
Last Reviewed: April 9, 1999