Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bit Data type in a select query or view

Status
Not open for further replies.

BlackKnight

Programmer
Oct 18, 2000
348
US
Hi folks,

I have a yes/no field which is considered to be a bit type in MSDE (SQL Server 7.0). I have it in a select statement in a view but I get the error that the yes/no field is invalid since it is not included in the GROUP BY clause.

When I include it in the GROUP BY clause it says you can't group on a bit column. When I tried to put the bit column in the select statement in an aggregate function to avoid having to include it in the GROUP BY statement it said you can't use the aggregate function with a bit column.

Thanx in advance.

Have a good one!
BK
 
I find the SQLS limitation in this regard a "bit" awkward myself.

How about adding a CASE statement to the SELECT that converts 0/1 to "Y/N" or some such?

Robert Bradley

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top