首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

关于字符串相加的有关问题:由于null加上任何字符串都为null

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

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

热点排行