Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Selecting DISTINCT fo multiple columns
Message
De
29/06/1999 18:13:43
 
 
À
29/06/1999 14:45:40
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00235411
Message ID:
00235569
Vues:
22
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform