I need to update a template but duplicates are throwing off update query. Source data can have mutilple part numbers of same, but he serial number is unique. The proble is with multiple of the same, the same serial number is updating to multiple part numbers that are the same, need to map to correct part number.
Code:
UPDATE roll_template INNER JOIN roll_source_data
ON roll_template.[Part Number] = roll_source_data.PN SET roll__template.[Serial Number] = [roll_source_data].[SN];
Code:
pn sn
______
xyz1 0001
xzy2 0002
xyz2 0003
xyz3 0004
xyz5 0005
xyz5 0006