I have the table Vendors (VendorID PK, VendorName, VendorContactFName ,.....)
I want to find out the VendorName and VendorContactFName for those Vendors whose Contact First Name is different from The Contact First Name from any other Vendor, using joins.
I can find a way of finding the list of vendors having a contact first name equal to that of some other vendor.
select V1.VendorContactFName, V1.VendorName, V2.VendorName from vendors v1 join vendors v2 on v1.vendorContactFName = v2.vendorContactFName where v2.VendorID <>V1.vendorID EXCEPT Select VendorContactFname
It runs, but I cannot come up with a way of finding those vendors whose contact name is different from that of any other contact name. I keep getting overly large results - 14756 rows - whereas the original table has 128 rows.
I have even tried taking above query and using it with an except with a table containing all other ContactFnames (and other fields in original table) but that does not work.