Coalesce用法

select
Coalesce( '居住建筑->' || decode(JZLXFL,0,'传统民居',1,'花园别墅',2,'里弄住宅',3,'其他住宅建筑',4,'其他建筑') ,

  '公共建筑->' || decode(GGFWJZFL,0,'办公建筑',1,'体育建筑',2,'商业建筑',3,'医疗建筑',4,'军事建筑',5,'文化建筑',6,'宗教建筑',7,'教育建筑',8,'服务业建筑',9,'其他建筑') ,

  '工业建筑->' || decode(GYJZFL,0,'工业厂房建筑',1,'工业仓储建筑',2,'工业住宅建筑',3,'工业办公建筑',4,'其他建筑') ,

   '构筑物->' || decode(GZWFL,0,'桥梁',1,'亭',2,'其他')
)  as structure
from  hz_lsjz.tpk_lsjzjd


执行结果:




猜你喜欢

转载自deony2jacob1314.iteye.com/blog/1991923
今日推荐