I have a varchar field with true and false contains in them..
Declare @MyValue as bit
set @MyValue = convert(bit, 'True')
Give me the following error message:
Server: Msg 245, Level 16, State 1, Line 2
Syntax error converting the varchar value 'True' to a column of data type bit.
I can do the case statement with when on it like this:
select Deleted = CASE Deleted WHEN 'False' THEN '1' Else '0' END
I want to know why convert function does not work?