Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to GROUP BY ON 2 fields in SQL
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01362746
Message ID:
01363013
Vues:
32
This message has been marked as a message which has helped to the initial question of the thread.
Dmitry,

SQL Server will let you ORDER BY ordinal position in the result set, but it won't let you GROUP BY.
Select MyField1, myField2 from myTable group by MyField1, MyField2 order by 1,2
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform