Slightly more condensed than gbn's:
Assuming CourseId
is non-zero
CAST (COALESCE(FC.CourseId, 0) AS Bit)
COALESCE
is like an ISNULL()
, but returns the first non-Null.
A Non-Zero CourseId
will get type-cast to a 1, while a null CourseId
will cause COALESCE to return the next value, 0