Hi,
I'm working on SQL 2005.
I have 2 tables PODetails and VendorItemNumbers.
PODetails
ItemNo | VendorItemNo
123 | ABC
456 | XYZ
VendorItemNumber
ItemNo | VendorItemNo
123 | ABC
123 | DEF
456 | GHY
My query result should only show the item numbers which have an incorrect vendor item number.
In the above example it should only return 456 - GHY because this combination does not exist in table VendorItemNumber.
My query however returns 456 - GHY AND 123 - DEF.
SELECT * FROM PODetails INNER JOIN VendorItemNumber ON PODetails.Itemno = VendorItemNumber.ItemNo WHERE PODetails.VendorItemNo <> VendorItemNumber.VendorItemNo
How do I get it to only show those combination that do not exist in table VendorItemNumber?
Thanks for any help.
I'm working on SQL 2005.
I have 2 tables PODetails and VendorItemNumbers.
PODetails
ItemNo | VendorItemNo
123 | ABC
456 | XYZ
VendorItemNumber
ItemNo | VendorItemNo
123 | ABC
123 | DEF
456 | GHY
My query result should only show the item numbers which have an incorrect vendor item number.
In the above example it should only return 456 - GHY because this combination does not exist in table VendorItemNumber.
My query however returns 456 - GHY AND 123 - DEF.
SELECT * FROM PODetails INNER JOIN VendorItemNumber ON PODetails.Itemno = VendorItemNumber.ItemNo WHERE PODetails.VendorItemNo <> VendorItemNumber.VendorItemNo
How do I get it to only show those combination that do not exist in table VendorItemNumber?
Thanks for any help.