Thanks.I thought so too, until I noticed some special cases where it will not work.Your query, and this below, will workDECLARE @Sample TABLE (RowID INT IDENTITY, Col1 VARCHAR(20), Col2 VARCHAR(20))INSERT @SampleSELECT 'configdesctext', '' UNION ALLSELECT 'configdesctext', '@' UNION ALLSELECT 'peso', '' UNION ALLSELECT 'peso', '@' UNION ALLSELECT 'x', '' UNION ALLSELECT 'yak', '@'-- MadhiSELECT s.*FROM @Sample AS sWHERE s.Col1 NOT IN (SELECT DISTINCT x.Col1 FROM @Sample AS x WHERE x.Col1 <> 'configdesctext' AND x.Col2 = '')-- PesoSELECT s.*FROM @Sample AS sLEFT JOIN @Sample AS x ON x.Col1 = s.Col1 AND x.Col1 <> 'configdesctext' AND x.Col2 = ''WHERE x.Col1 IS NULL
E 12°55'05.25"N 56°04'39.16"