Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting DISTINCT fo multiple columns
Message
From
29/06/1999 18:13:43
 
 
To
29/06/1999 14:45:40
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00235411
Message ID:
00235569
Views:
21
>Hello All,
>
>I have a table from which I need to select unique rows. Because the table contains dups. We are trying to select the unique or non-unique rows using 2 columns. Select Distinct does not seem to work on multiple rows. Any suggestions? TIA.
>
>Regards,
>
>Paige

Is this what you want?

SELECT col1, col2
FROM table
GROUP BY col1, col2
HAVING COUNT(*) > 1

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform