SQL Server Home
1 and 0 not 'recognised' as boolean
as Won't Fix
2/27/2008 9:13:31 AM
User(s) can reproduce this bug
Bit columns store a 1 or a 0.
"Select bitColumn from tbl" returns a 1 or a 0.
So why is when you use Open table (SSMS2005) or Edit table (SSMS2008), you have to use True and False.
SQL doesn't understand True/False, there's no such concept / constants, yet the editor forces us to type 4 or 5 characters instead of just 1.
Entering 1 or 0 in a bit column gives the ERROR:
Invalid value for cell (row 42, column 17).
The changed value in this cell was not recognized as valid.
.Net Framework Data Type: Boolean
Error Message: String was not recognized as a valid Boolean.
Type a value appropriate for the data type or press ESC to cancel the change.
How can 1 or 0 NOT be a valid boolean?
Bit fields should allow 1 or 0.
Please updated Edit table (SSMS2008) so that the user can enter a 1 or a 0 and it is recognised as a bit field value.
I was going to enter this as a suggestion, until I read the error message closely.
However, this is probably a .Net error rather than SSMS, so, if you want, close this and I'll raise a suggestion that a workaround be placed into SSMS.
SQL Server 2008 February CTP
Tools (SSMS, Agent, Profiler, etc.)
Windows XP Professional
Operating System Language
Steps to Reproduce
Right click an existing table that contains a bit column, select Edit Top 200 Rows
Cursor to bit column
Type in: 1
Exception, 1 not a valid boolean
1 stored correctly
possibly displayed as True if you really want it to!
to post a comment.
Please enter a comment.
on 10/22/2010 at 2:11 AM
Why call it a "bit" datatype when bit is simply "1" and "0"? "True" and "False" simply does not make sense when calling it a "bit". Might as well call it "Logic" datatype. Makes more sense.
on 12/10/2009 at 11:40 AM
What kind of response/resolution is this? Sometimes it feels like we'd be more productive bashing our heads against a brick wall rather than take the time to report bugs here on Connect, only to have them summarily dismissed like this.
As for the suggestion, I would definitely like to see this addressed. It's a royal chore having to type the whole word, especially when 1 and 0 *are* the values the data type accepts.
on 7/6/2009 at 5:50 AM
Shockingly bad feedback here from Microsoft (only seeing the comment made at 03/03/2008 at 06:06 at the tie of writing)
on 3/14/2008 at 9:24 AM
Huh? Is this a joke? Or did you just not read what I had entered? That happened a lot in the VS connect feedback, but so far has been quite good in the SQL connect feedback.
Problem: Have to enter True / False
Workaround: Have to enter True / False
How can that be a workaround?
Obviously I know that I have to enter True / False, that's what I reported.
True / False is confusing as it does not represent the bit data type correctly or consistently throughout SSMS/SQL which correctly uses 1/0 everywhere else.
on 3/3/2008 at 6:06 AM
Thank you for reporting this problem. The current workaround is to use True/False instead of 1/0 for the bit datatype.
to post a workaround.
Please enter a workaround.
© 2014 Microsoft