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

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?
 
try this:
UPDATE [Certifications] SET [Verified] = 1 WHERE [Employee Name] = 'Buttros, Peter' AND [Certification] = 'MCSE' AND [Verified] = 0;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top