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),

 

你可能感兴趣的:(Note)