Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

insert boolean value in a column with data type bit

 
gaurav chaudhary
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In MSSQLServer2000, I am having a table named Table1. In this table, there is only one column with column name bit_test. Now, when I run this query

it is giving me the error that error converting varchar to bit field. Can you please tell me how can i insert this boolean in a column whose datatype is bit
thanks
gaurav
 
Tina Coleman
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I seem to recall having to convert my booleans to 1s and 0s when we ran into the same problem in mySQL. Don't guarantee that that's the best solution, but it worked.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic