Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Don’t miss your chance to meet our SuiteGurus—NetSuite Support professionals and subject matter experts with extensive experience in select product areas, including OneWorld, Advanced & Basic Accounting, Supply Chain Management, Receivables & Payables, CRM, Account Administration, and the SuiteCloud Platform. Full Conference attendees can prebook exclusive 30-minute one-on-one sessions for your product questions.
Spots are limited! Register through your Agenda Builder and find SuiteGuru under Agenda Enhancements.
SQL Formula
Can anyone tell me where I have gone wrong with this expression?
(((DECODE(TO_CHAR({custrecord_mth_date},'MMYYYY'), TO_CHAR(ADD_MONTHS({today},-2),'MMYYYY'),({custrecord_mth_tot_ramp_hrs}),0))
-(DECODE(TO_CHAR({custrecord_mth_date},'MMYYYY'), TO_CHAR(ADD_MONTHS({today},-14),'MMYYYY'),({custrecord_mth_tot_ramp_hrs}),0)))/NULLIF(DECODE(TO_CHAR({custrecord_mth_date},'MMYYYY'), TO_CHAR(ADD_MONTHS({today},-14),'MMYYYY'),({custrecord_mth_tot_ramp_hrs}),0),0))
When I run it as a Formula (numeric), I'm getting -1 on all records.
Following is actual data and what I am trying to accomplish:
(460.27 - 330.46) / 330.46 = 39.3%
When I run the two pieces of the formula separate (460.27 - 330.46) and retrieving the 330.46, the results are fine. When I add the division between the 2 sets of data is when I'm getting inaccurate results.