I’d like to query a table, returning only rows where a specific column has unique values. Something like:
SELECT DISTINCT Col1, Col2, Col3
FROM Table1
but only have the ‘DISTINCT’ predicate apply to Col1, not the entire row.
I’m able to count the unique rows using a HAVING COUNT(*)>1 clause, but I can’t seem to find a concise way (other than temp tables) to filter them out.
I’m using SQL Server 7.0.
TIA for any pointers.