xerxes
xerxes

Reputation: 1

How to get accumulated total in Netsuite saved search?

I have a scenario where i have to take sum of a columns values in a linear fashion. I am using:- SUM({custrecord_hm_bc_payroll_net_pay}) OVER(PARTITION BY {custrecord_advs_hold_unhold_status} ORDER BY {custrecord_hm_bc_payroll_emp_id} ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)

Please suggest.

Upvotes: 0

Views: 3656

Answers (1)

michoel
michoel

Reputation: 3783

To use Oracle's analytic functions in a Netsuite Saved Search you need to trick the system by inserting a comment -

SUM/* comment */({custrecord_hm_bc_payroll_net_pay}) OVER(PARTITION BY {custrecord_advs_hold_unhold_status} ORDER BY {custrecord_hm_bc_payroll_emp_id} ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)

Link

Upvotes: 0

Related Questions