为了账号安全,请及时绑定邮箱和手机立即绑定

求报表+视图数据绑定答案?

求报表+视图数据绑定答案?

慕尼黑的夜晚无繁华 2018-10-10 03:02:53
报表格式:CODE PPD COLL            PPD COLLCP              C                  P   CC             C                           CPP       P                       P我要实现根据CODE来自动相应填充PPD或COLL ?其中只有CODE这一字段在视图中 ,这个视图怎么写才能实现上面的效果?请高手帮忙,谢谢了
查看完整描述

1 回答

?
RISEBY

TA贡献1856条经验 获得超5个赞

select code,case substring(code,1,1) when 'C' then '' else 'P' end as PPD,case substring(code,1,1) when 'P' then '' else 'C' end as COLL,case substring(code,2,1) when 'C' then '' else 'P' end as PPD,case substring(code,2,1) when 'P' then '' else 'C' end as COLL from xx

查看完整回答
反对 回复 2018-10-22
  • 1 回答
  • 0 关注
  • 307 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信