这条sql语句怎么写? select case 明细 when 1 then ' '+内容 else 内容 end from t 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select 内容=(case 明细 when 1 then ' ' else 内容 end) ,明细=(case 明细 when 0 then ' ' else 内容 end)from 表A 看似两列、又似一列:我再少一列:select 内容=(case 明细 when 1 then ' '+内容 else 内容 end) from 表A create table tb( 内容 nvarchar(3000), 明细 int)insert into tbselect '01',0unionselect '02',0unionselect '03',1select 内容 = (case 明细 when 1 then ' ' + 内容 else 内容 end)from tbdrop table tb--结果0102 03 用DTS导数据时,如何防止导入重复数据 如何折行显示SQL某字段 ??? exists的一点问题。 本区第一号菜鸟开始提问了 向高手:求一条更新或插入数据的触发器代码 通过存储过程返回的表创建临时表 如果您能回答出这个问题的5个可行解决方案,您将得到60分,且,您真的是高手!!!嘻嘻,尽快!!! 数据库恢复 如何在数据库中存储图片?? sql server 2005如何访问其它数据库 高手们:求一语句 没遇到过的统计,望各位大哥大姐帮帮忙
,明细=(case 明细 when 0 then ' ' else 内容 end)
from 表A
select 内容=(case 明细 when 1 then ' '+内容 else 内容 end) from 表A
insert into tb
select '01',0
union
select '02',0
union
select '03',1select 内容 = (case 明细 when 1 then ' ' + 内容 else 内容 end)
from tb
drop table tb
--结果
01
02
03