Do you mean ...Is there a way get distinct results between pf and sf? Select pf.name, sf.name From tblpropertyfeatures, tblsuitefeatures Inner Join tblfeatures AS pf ON tblpropertyfeatures.featureid = pf.id Inner Join tblfeatures AS sf ON tblsuitefeatures.featureid = sf.id
SELECT MIN(TableName) as TableName, id, name FROM ( SELECT 'Table a' as TableName, a.id, a.name FROM tblpropertyfeatures UNION ALL SELECT 'Table b' as TableName, b.id, b.name FROM tblsuitefeatures ) AS tmp GROUP BY id, name HAVING COUNT(*) = 1 ORDER BY ID;PB
----------------------------------------- Mark Steudel NetRiver Web and Application Developer 555 Dayton St. Suite A Edmonds, WA 98020 w: http://www.netriver.net p: 425.741.7014