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

报表格式:

CODE PPD COLL            PPD COLL

CP              C                  P   

CC             C                           C

PP       P                       P


我要实现根据CODE来自动相应填充PPD或COLL ?
其中只有CODE这一字段在视图中 ,这个视图怎么写才能实现上面的效果?

请高手帮忙,谢谢了

慕尼黑的夜晚无繁华
浏览 313回答 1
1回答

RISEBY

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
打开App,查看更多内容
随时随地看视频慕课网APP