What is the best way to convert an int or null to boolean value in an SQL query, such that:
SELECT CASE WHEN thevalue IS NULL THEN 0 ELSE 1 END AS newVal FROM .... (rest of select)
I think it goes something like this
Actually, the ISNULL, may need to be WHEN thevalue IS NULL THEN 0