Hi,
I have 2 tables and I need to update tbl_Vendor_Tracker.PI_Contact_Name with values from tbl_MDV_SDV_PI_CONTACT.PI_Contact_Name everytime a certain update process runs. How do I code the SQL for the join on Country if the values in tbl_MDV_SDV_PI_CONTACT.Country could be "SHARED" or "US ONLY" but the values in tbl_Vendor_Tracker.Country will only be "US ONLY or SHARED" (one value) without creating duplicatng rows in the table for the other fields in the join?
Below is my current SQL:
UPDATE tbl_MDV_SDV_PI_CONTACT
INNER JOIN tbl_Vendor_Tracker
ON (tbl_MDV_SDV_PI_CONTACT.Country = tbl_Vendor_Tracker.Country)
AND (tbl_MDV_SDV_PI_CONTACT.MSD_NBR = tbl_Vendor_Tracker.SDV_Number)
AND (tbl_MDV_SDV_PI_CONTACT.MDV_NBR = tbl_Vendor_Tracker.Division_Number)
SET tbl_Vendor_Tracker.PI_Contact_Name = [tbl_MDV_SDV_PI_CONTACT].[PI_Contact_Name];
Thanks in advance,
C
I have 2 tables and I need to update tbl_Vendor_Tracker.PI_Contact_Name with values from tbl_MDV_SDV_PI_CONTACT.PI_Contact_Name everytime a certain update process runs. How do I code the SQL for the join on Country if the values in tbl_MDV_SDV_PI_CONTACT.Country could be "SHARED" or "US ONLY" but the values in tbl_Vendor_Tracker.Country will only be "US ONLY or SHARED" (one value) without creating duplicatng rows in the table for the other fields in the join?
Below is my current SQL:
UPDATE tbl_MDV_SDV_PI_CONTACT
INNER JOIN tbl_Vendor_Tracker
ON (tbl_MDV_SDV_PI_CONTACT.Country = tbl_Vendor_Tracker.Country)
AND (tbl_MDV_SDV_PI_CONTACT.MSD_NBR = tbl_Vendor_Tracker.SDV_Number)
AND (tbl_MDV_SDV_PI_CONTACT.MDV_NBR = tbl_Vendor_Tracker.Division_Number)
SET tbl_Vendor_Tracker.PI_Contact_Name = [tbl_MDV_SDV_PI_CONTACT].[PI_Contact_Name];
Thanks in advance,
C