Is it possible to express 1 or 0 as a bit when used as a field value in a select statement?
e.g.
In this case statement (which is part of a select statement)
No, but you could cast the whole expression rather than the sub-components of that expression. Actually, that probably makes it less readable in this case.
Enjoy this :) Without cast each value individually.
SELECT ...,
IsCoursedBased = CAST(
CASE WHEN fc.CourseId is not null THEN 1 ELSE 0 END
AS BIT
)
FROM fc