I have a item file with one item per record and a detail file with many customers with many descriptions. Each customer can have many items. Each item can have many customers.
File 1 Item ID File 2 Item ID Customer Number
I am trying to get a list of item IDs with only one customer number showing an example of one customer who has each item.
Select * from file1 left join (select distinct itemid, customernumber from File2) B ON A.itemid = b.itemid
Gives me too many results. Any advice or suggestions would be greatly appreciated.