求中间文件的排序法
(case
when substr(AAA.収入日, 4, 6) IN ('01', '02', '03')
then
to_char(add_months(to_char(AAA.収入日, 'yyyymmdd'), -12),'yyyy')
when substr(AAA.収入日, 4, 6) IN ('04', '05')
then
case
when substr(BBB.修改日, 0, 4) =
substr(BBB.収入日, 0, 4)
then
substr(BBB.収入日, 0, 4)
else
to_char(add_months(to_char(BBB.収入日, 'yyyymmdd'), -12), 'yyyy')
end
else substr(BBB.収入日, 0, 4)
end) AS 年度
instr(01, AAA.bbb) > 0
不懂
(case
when substr(AAA.収入日, 4, 6) IN ('01', '02', '03')
then
to_char(add_months(to_char(AAA.収入日, 'yyyymmdd'), -12),'yyyy')
when substr(AAA.収入日, 4, 6) IN ('04', '05')
then
case
when substr(BBB.修改日, 0, 4) =
substr(BBB.収入日, 0, 4)
then
substr(BBB.収入日, 0, 4)
else
to_char(add_months(to_char(BBB.収入日, 'yyyymmdd'), -12), 'yyyy')
end
else substr(BBB.収入日, 0, 4)
end) AS 年度
instr(01, AAA.bbb) > 0
不懂
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货