I am trying to concatonate an nvarchar and integere value like so:
SELECT TOP 100 PERCENT cus_key, cus_dataworks_num, CAST(cus_dataworks_num AS nvarchar(10)) + ' - ' + cus_name AS name
FROM dbo.tbl_customer_detailed
ORDER BY cus_name
But cus_dataworks_num can be NULL. When it is, the whole "name" value returns a NULL. How can I replace just the Null cus_dataworks_num with "####" (or something similar, or with a zero length string)?
Thanks
SELECT TOP 100 PERCENT cus_key, cus_dataworks_num, CAST(cus_dataworks_num AS nvarchar(10)) + ' - ' + cus_name AS name
FROM dbo.tbl_customer_detailed
ORDER BY cus_name
But cus_dataworks_num can be NULL. When it is, the whole "name" value returns a NULL. How can I replace just the Null cus_dataworks_num with "####" (or something similar, or with a zero length string)?
Thanks