부과예고 년도계산 쿼리 수정

dev
박성영 3 months ago
parent 166b25d665
commit a8039a0e14

@ -45,7 +45,7 @@
pi.PSTN_IDX_NO, -- 위치지수 NO
pi.PSTN_IDX, -- 위치지수
substring(t3.ACT_BGNG_YMD,1,4) as ELPS_YR_RDVLRT_YR,
CASE WHEN (CAST(substring(t3.ACT_BGNG_YMD,1,4) as SIGNED)-CAST(t1.CRDN_YR as SIGNED)) >= strct.RDVLRT_CN_YR_CNT THEN strct.LAST_YR_RDVLRT
CASE WHEN ( CAST(t1.CRDN_YR as SIGNED) - CAST(substring(t3.ACT_BGNG_YMD,1,4) as SIGNED) ) >= strct.RDVLRT_CN_YR_CNT THEN strct.LAST_YR_RDVLRT
ELSE 1-(
(CAST(t1.CRDN_YR as SIGNED) - CAST(substring(t3.ACT_BGNG_YMD,1,4) as SIGNED))
* strct.DPRT

Loading…
Cancel
Save