Convert Boolean To String

I have a field of type bit, and it is storing true/false values.  I want to run a query against this table and convert this true/false to a "Yes"/"" string.

In Access I could use this: "IIf([BoolColumn],"Yes","") AS Expr1", but I can't get this to work in SQL.
LVL 10
eternal_21Asked:
Who is Participating?
 
rafranciscoConnect With a Mentor Commented:
or:

CASE WHEN [BoolColumn] = 1 THEN 'Yes' ELSE '' END AS Expr1
0
 
rafranciscoCommented:
Try:

CASE [BoolColumn] WHEN 1 THEN 'Yes' ELSE '' END AS Expr1
0
 
eternal_21Author Commented:
The latter worked perfectly.  Thank you rafrancisco for your quick response.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.