I have two tables. Table1 is a list that I import from an Excel sheet, Table2 is a table that I append the list from Table1 into. I need to check to see if the items from Table1 exists in Table2 before appending them so there are no duplicates. The duplicates are determined by two fields, IdexID and VIN. The VIN can be repeated as long as its IndexId is not the same. The IndexId is determined by its parent record it belongs to.
Example:
NOT OK
IndexId 1, VIN XYZ
IndexId 1, VIN XYZ
IndexId 1, VIN XYZ
OK
IndexId 1, VIN XYZ
IndexId 2, VIN XYZ
IndexId 3, VIN XYZ
Example:
NOT OK
IndexId 1, VIN XYZ
IndexId 1, VIN XYZ
IndexId 1, VIN XYZ
OK
IndexId 1, VIN XYZ
IndexId 2, VIN XYZ
IndexId 3, VIN XYZ