I am trying to add a new field to an existing table based on two fields within the table and comparing against a second unassociated table. My tables look something like this:
Table 1:
CUSTOMER_NAME
VEHICLE_MODEL
HENRY FORD MOTORS
-
DAN'S AUTO SHOP
FOCUS
VICTORY FORD
-
Table 2:
Customer
Model
OEM
FORD
FOCUS
FORD
FORD
EXPLORER
FORD
The goal is to be able to add a field to Table 1, called 'OEM', and assign the correct OEM value from Table 2 based either on the CUSTOMER_NAME or the VEHICLE_MODEL. And the tricky part is that I want to do this by seeing if the Customer value in Table 2 is contained in the CUSTOMER_NAME field. And same for Model. The outcome would be that all three of the records in Table 1 would have an OEM value of 'FORD'.