Table to Table Update

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

Guest

Hi!

I have a table, made from the merge of two old tables. Using Access DB.

Because one field in Table1 was called Wholesale and in Table2 was called
Wholesaler the data in that column defaulted to Table 2.

I want to go back using the new Profile table, look up all Wholesale values
with Is Null values based on a common primary key. I am able to query the new
table and return results as espected.

How do I then go back and get the values from ACES and update the records in
Profile with the Wholesale values IF they exist?

SELECT PROFILE_BAK.Wholesalers, PROFILE_BAK.AGENCY_PROFILE_ID
FROM ACES RIGHT JOIN PROFILE_BAK ON (ACES.Wholesale =
PROFILE_BAK.Wholesalers) AND (ACES.AGENCY_PROFILE_ID =
PROFILE_BAK.AGENCY_PROFILE_ID)
WHERE (((PROFILE_BAK.Wholesalers) Is Null));
 
Hi,


Not sure I follow. Make a backup, and try something like:

UPDATE
aces RIGHT JOIN Wholesalers
ON (aces.Wholesale = profile_bak.Wholesalers)
AND (aces.agency_profile_id= profile_bak.agency_profile_id)

SET profile_bak.something = aces.something

WHERE profile_bak.Wholesalers IS NULL




Hoping it may help,
Vanderghast, Access MVP
 
Back
Top