I\'m running a really simple query, however for some of the results the value in one field is null. How can I set that value to \"a string\" if its value is null?
Someth
As noted above, the coalesce solution is preferred. As an added benefit, you can use the coalesce against a "derived" value vs. a selected value as in:
SELECT
{stuff},
COALESCE( (select count(*) from tbl where {stuff} ), 0 ) AS countofstuff
FROM
tbl
WHERE
{something}
Using "iif" or "case" you would need to repeat the inline whereas with coalesce you do not and it allows you to avoid a "null" result in that return...