I have a Part Number that is a foreign key between the 'iSup_table' (Supplier_item) and the 'Part_variance' table (Component_part_no_finish_code). Based on the Part Number, I need to return 'Line_num'. The issue is that a Part Number can have more then one 'Line_num' in the iSup_table. I need a query that will return multiple 'Line_num' in the 'iSup_table' for each Part Number in the 'Part_variance' table, if applicable. I then need to update the 'Line_num' field in the 'Part_variance' table.
Part_variance table
------------------------------
Component_part_no_finish_code
iSup_table
----------------
Supplier_item
Line_num
The below query is returning the same 'Line_num' for each Part Number, when there is more than one 'Line_num' for each 'Part_num'. I hope this makes a little more sense?
Thanks in advance
Ray
Part_variance table
------------------------------
Component_part_no_finish_code
iSup_table
----------------
Supplier_item
Line_num
The below query is returning the same 'Line_num' for each Part Number, when there is more than one 'Line_num' for each 'Part_num'. I hope this makes a little more sense?
Code:
UPDATE iSupTable RIGHT JOIN [Part_variance]
ON iSupTable.[Supplier_item] = [Part_variance].[Component_part_no_finish_code]
SET [Part_variance].[iSupp_line_no] = [Line_num];
Thanks in advance
Ray
Last edited: