ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle case

oracle case

原创 Linux操作系统 作者:zangma54 时间:2010-01-04 10:09:18 0 删除 编辑
select substr(msgtime,1,6),b.real_name,--decode(a.respon_type_text ,like 'LYGWL','','','','')
case
when a.respon_type_text like '%运抵%' then '运抵提单数'
when a.respon_type_text like '%理货%' then '理货提单数'
else a.respon_type_text
end case,
count(*) from v_ccrespon_blnoinfo a,servsite.login b
where a.edi_username=b.user_name and a.edi_username not in('LYGXDFDZ') and a.blno is not null
group by substr(msgtime,1,6),real_name,
case
when a.respon_type_text like '%运抵%' then '运抵提单数'
when a.respon_type_text like '%理货%' then '理货提单数'
else a.respon_type_text
end 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/185279/viewspace-624197/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: oracle sign
下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2008-06-16

  • 博文量
    4
  • 访问量
    11539