Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Including bit field in a group
Message
From
22/10/2015 08:23:07
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
21/10/2015 17:22:31
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01626293
Message ID:
01626325
Views:
34
>Usually, when I have a GROUP clause, and the select for the fields has to include additional fields, I simply use the MAX() syntax to add more fields which are not part of the group. However, I now need to include a bit field. A MAX() is not supported on a bit field. What would be the best approach to obtain that field in the field list?

You can max(cast(bitfield as tinyint)) and perhaps even cast(max(cast(bitfield as tinyint)) as bit).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform