I have a select query that returns 92 rows with 5 columns, including some duplicates.
If I do a select distinct query like this I can return the correct number of rows (47), although this only returns 1 column
How can I add the rest of the 4 columns to this result?Code:SELECT distinct id FROM #tmpDoc
This query returns more than 47 rows, and some of the ids in the rows are duplicates.
Code:SELECT distinct id, col2, col3, col4, col5 FROM #tmpDoc


Reply With Quote