note

first_value(tafd.adv_nushi_ryaku_name) over(partition by tafd.adv_nushi_code order by substr(tafd.fee_mgmt_num, 2, 11) desc, substr(tafd.fee_mgmt_eda, 2, 2) desc) as advNushiNameRyaku,

 

(select regexp_substr(replace(Seikyu_Nengetsu, '/', ''), '[^@]+', 1, rownum) Seikyu_Nengetsu
from (select #{shukeiDateStr,jdbcType=CHAR} Seikyu_Nengetsu from dual)
connect by rownum <= length(regexp_replace(Seikyu_Nengetsu, '[^@]+'))) TS

 

DECODE(#{kuaNegatuFlag,jdbcType=CHAR},
'0',
TO_NUMBER(substr(tital.uriageNengetsu, 5, 6)),
CASE
WHEN TO_NUMBER(substr(tital.uriageNengetsu, 5, 6)) <=
TO_NUMBER(substr(replace(#{shukeiDateTo,jdbcType=CHAR}, '/', ''), 5, 6)) THEN
TO_NUMBER(substr(tital.uriageNengetsu, 5, 6)) + 12
ELSE
TO_NUMBER(substr(tital.uriageNengetsu, 5, 6))
END),

 

posted @ 2015-07-24 10:19  曹刚  阅读(231)  评论(0编辑  收藏  举报