I used a case to change boolean column values to a text string that actually means something. Firstly, when doing a WHERE statement on these columns do I use the boolean values or the updated text strings?
I used:
WHERE TrainingProgram.blnInCatalogue = 'Yes'
AND TrainingProgram.blnActive = 'Inactive'
But I get the error:
Conversion failed when converting the varchar value ‘Yes’ to data type bit.
Am I doing something wrong?
For true, try using:
For false, try using:
The
blnInCataloguecolumn is a bit field, and it doesn’t understand what the string ‘Yes’ means. It only knows 0 or 1.