Smack the DBA that designed that database??If you can figure ou how to break the data into a table similar to mine, you are golden methinks. CREATE TABLE #Steel(FamilyID INT, GenderID INT , HumanID VARCHAR(50), Brand VARCHAR(50))INSERT INTO #Steel(FamilyID, GenderID, HumanID, Brand) VALUES(1,1, '1.1', 'TimberLand')INSERT INTO #Steel(FamilyID, GenderID, HumanID, Brand) VALUES(1,2, '1.2', 'Gucci')INSERT INTO #Steel(FamilyID, GenderID, HumanID, Brand) VALUES(2,1, '2.1', 'Tommy')INSERT INTO #Steel(FamilyID, GenderID, HumanID, Brand) VALUES(2,2, '2.2', 'Liz clairbone')INSERT INTO #Steel(FamilyID, GenderID, HumanID, Brand) VALUES(3,1, '3.1', 'Levi')INSERT INTO #Steel(FamilyID, GenderID, HumanID, Brand) VALUES(3,2, '3.2', 'Walmart')SELECT m.HumanID, m.Brand, f.HumanID, f.BrandFROM #Steel mINNER JOIN #Steel f on f.FamilyID = m.FamilyID WHERE m.GenderID = 1AND f.GenderID = 2DROP TABLE #Steel
Michael<Yoda>Use the Search page you must. Find the answer you will.</Yoda>