Guidance required for Update Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an access database with a customer table listing various details, such
as customer ID, Name, date joined, main contact, etc.
I need to update specific information, for specific customer ID's. I
therefore have a maintenance table showing the records (by customer ID) that
I wish to update the customer table with.
I created an update query, selecting the Main Contact field and specifying
the 'update to' as: [Maintenance].[Name]. I will need to specifiy which
customer this relates to though, therefore do I need to drag the customer ID
into another field in the design grid? Do I then leave the Update To field
blank?
 
you need to have both tables as the source for your query, with a join on the
Customer ID.
 
If your problem is like updating unit prices for some items, you need a
join:

UPDATE pricesList LEFT JOIN newPrices
ON pricesList.itemID = newPrices.itemID
SET pricesList.unitPrice = newPrices.unitPrice,
pricesList.itemID = newPrices.itemID



(note that it not only update existing prices, but also append new items, if
it is the case).


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top