Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group by question
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00495957
Message ID:
00496063
Views:
11
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform