读书人

关于字符串相加的有关问题:由于null加

发布时间: 2012-03-20 14:01:10 作者: rapoo

关于字符串相加的问题:由于null加上任何字符串都为null
我现在是这样的写的,请教各位有什么更好的方法??
是SQL 2008 R2

SQL code
(case when A.ItemMemo is null then '' else A.ItemMemo end)     +                  (case when A4.Description is null then '' else A4.Description end)    AS 工艺要求


[解决办法]
SQL code
isnull(A.ItemMemo,'')+isnull(A4.Description,'') as 工艺要求
[解决办法]
探讨

SQL code
isnull(A.ItemMemo,'')+isnull(A4.Description,'') as 工艺要求

[解决办法]
SQL code
isnull(A.ItemMemo,'')+isnull(A4.Description,'') AS 工艺要求 

读书人网 >SQL Server

热点推荐