日期:2014-05-18  浏览次数:20563 次

关于字符串相加的问题:由于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 工艺要求