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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Update with Boolean Problem 1

Status
Not open for further replies.

TheDrParker

Programmer
Nov 21, 2001
55
US
When I try this:
UPDATE [Certifications] SET [Verified] = 'True' WHERE [Employee Name] = 'Buttros, Peter' AND [Certification] = 'MCSE' AND [Verified] = 'False';

I get:
…[SQL Server]Syntax error converting the varchar value 'False' to a column of data type bit.

And when I try this:
UPDATE [Certifications] SET [Verified] = True WHERE [Employee Name] = 'Buttros, Peter' AND [Certification] = 'MCSE' AND [Verified] = False;

I get:
…[SQL Server]Invalid column name 'True'.

What am I doing wrong or missing?

 
The bit column is like it says, it only will store a 1 or a 0. Try substituting a 1 for true and a 0 for false and you should be all set.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top