Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Group by question
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00495957
Message ID:
00496063
Vues:
10
>You should be able to use the expression in your GROUP BY as long as you use the same expression used in the column list. Here's an example (a poor one)
>
>SELECT count(*), 'fullname'+au_lname+au_fname as fullname
>from authors
>group by 'fullname'+au_lname+au_fname
>
>-Mike

Thanks Mike. I opted for gettion out of the UNION, and instead did the Insert into #union1 for each select after the first one. This worked well and I got out of the "ARM #" + ltrim(str(arm))+space(14) issue that you could not grop by.

__Stephen
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform