Hell when I do:
select COALESCE (CORP_ID, 0) from crmuser.accounts;
The CORP_ID records which are Null returns 0 but when I do:
<
you should do
select COALESCE (EMAIL, n'NO EMAIL') from crmuser.accounts
to convert the literal to NVARCHAR.
eg http://sqlfiddle.com/#!4/73929/1 vs http://sqlfiddle.com/#!4/73929/2