Hi Experts The Below is the SQL Oracle, need to build in BODI CASE WHEN SUBSTR(xxxxxxx.LINE_CD ,1 ,2) IN ('BI','BN') THEN (xxxxx.PMT_DUE_DTE)-14 ELSE CASE WHEN EXTRACT( DAY FROM xxxxx.NXT_PMT_DUE_DTE- NUMTODSINTERVAL( EXTRACT( DAY FROM xxxxx.PMT_DUE_DTE), 'DAY' ) + INTERVAL '1' DAY + NUMTOYMINTERVAL( -1, 'MONTH' ) + INTERVAL '1' MONTH - INTERVAL '1' DAY ) < EXTRACT( DAY FROM xxxx.PMT_DUE_DTE) THEN xxxxxxx.PMT_DUE_DTE- NUMTODSINTERVAL( EXTRACT( DAY FROM xxxxx.PMT_DUE_DTE), 'DAY' ) + INTERVAL '1' DAY + NUMTOYMINTERVAL( -1, 'MONTH' ) + INTERVAL '1' MONTH - INTERVAL '1' DAY ELSE xxxxxxxx.PMT_DUE_DTE+ NUMTOYMINTERVAL( -1, 'MONTH' ) END END AS LAST_FULL_PAYMENT Please let me know Thanks Madhu
↧