Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I please get help with a DECODE function that contains a derived

Status
Not open for further replies.

amandacody

Technical User
Jun 16, 2011
1
US
I'm trying to get a derived field to annualize a deduction based upon the employees company code. Here's the code I've got so far.

@DECODE(REPORTS.V_DEDUCTIONS.[[CO]],'YDJ',( SUM(DISTINCT @DECODE(REPORTS.V_DEDUCTIONS.DEDUCTIONCODE,'13',REPORTS.V_DEDUCTIONS.DEDUCTIONAMOUNT,0) ) )*24,'YDK',( SUM(DISTINCT @DECODE(REPORTS.V_DEDUCTIONS.DEDUCTIONCODE,'13',REPORTS.V_DEDUCTIONS.DEDUCTIONAMOUNT,0) ) )*26,'VRW',( SUM(DISTINCT @DECODE(REPORTS.V_DEDUCTIONS.DEDUCTIONCODE,'13',REPORTS.V_DEDUCTIONS.DEDUCTIONAMOUNT,0) ) )*26,0)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top