June 30, 2014 at 7:38 pm
converT this PLSQL TO TSQL
help
CUSTOMER# - DECODE(Transaction Type Code,'FULL RETIREMENT',3,'PARTIAL RETIREMENT',DECODE(SAME_YEAR,'Y',3),'ADDITION',DECODE(SAME_YEAR,'Y',( DECODE(TO_NUMBER(SUBSTR(Date Entered,-2))-( TO_NUMBER(SUBSTR(Date Placed In Service,-2)) ),0,1,4) )),'ADJUSTMENT',DECODE(SAME_YEAR,'Y',( DECODE(( TO_NUMBER(SUBSTR(Date Entered,-2))-Add Year-TO_NUMBER(SUBSTR(Date Placed In Service,-2)) )+TO_NUMBER(SUBSTR(:Date,-2)),0,1,1,4,2) )))
June 30, 2014 at 10:42 pm
DECODE should be converted to CASE statement(s).
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply