标签:end char ase case ora bsp when pad start
select (CASE WHEN to_char(sysdate, ‘MM‘ )=‘01‘ then ‘A‘ WHEN to_char(sysdate, ‘MM‘ )=‘02‘ then ‘B‘ WHEN to_char(sysdate, ‘MM‘ )=‘03‘ then ‘C‘ WHEN to_char(sysdate, ‘MM‘ )=‘04‘ then ‘D‘ WHEN to_char(sysdate, ‘MM‘ )=‘05‘ then ‘E‘ WHEN to_char(sysdate, ‘MM‘ )=‘06‘ then ‘F‘ WHEN to_char(sysdate, ‘MM‘ )=‘07‘ then ‘G‘ WHEN to_char(sysdate, ‘MM‘ )=‘08‘ then ‘H‘ WHEN to_char(sysdate, ‘MM‘ )=‘09‘ then ‘I‘ WHEN to_char(sysdate, ‘MM‘ )=‘10‘ then ‘J‘ WHEN to_char(sysdate, ‘MM‘ )=‘11‘ then ‘K‘ WHEN to_char(sysdate, ‘MM‘ )=‘12‘ then ‘L‘ end) || lpad(SEQ_NXHTBH.nextval, 4, ‘0‘) START_CODE from dual
oracle数据库,对每个月份进行分类获取对应月份的对应内容,case...when... 的使用
标签:end char ase case ora bsp when pad start
原文地址:https://www.cnblogs.com/eastwjn/p/9388928.html