1 and 0 not 'recognised' as boolean - by MarcF

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 330293 Comments
Status Closed Workarounds
Type Bug Repros 11
Opened 2/27/2008 9:13:31 AM
Access Restriction Public


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.

Sign in to post a comment.
Posted by alexpogi 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.
Posted by Daniel Smith 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.
Posted by Jamie Thomson 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)
Posted by MarcF 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.
Posted by Microsoft on 3/3/2008 at 6:06 AM
Hello MarcF1,

Thank you for reporting this problem. The current workaround is to use True/False instead of 1/0 for the bit datatype.