Order Management - EBS (MOSC)

MOSC Banner

Running Total not working with subquery

edited Sep 20, 2023 3:21PM in Order Management - EBS (MOSC) 3 commentsQuestion

Hi All,

Oracle EBS

Version : 12.2.10

for running total in subquery is not working, please i need some help

SELECT R.BILL_TO_CUSTOMER_ID,

TO_NUMBER (TO_CHAR (TRX_DATE, 'MM')) MNTH,

SUM (EXTENDED_AMOUNT) AMOUNT,

TO_NUMBER (TO_CHAR (trx_date, 'MM')) MNTH_YR

,TO_NUMBER (TO_CHAR (trx_date, 'YYYY')) YR

,(SELECT sum(YTD_BUDG) over ( order by MNTH rows unbounded preceding ) ytd_sales

 FROM

 (

 SELECT SUM(P_VALUE) YTD_BUDG , TO_NUMBER( TO_CHAR(to_date(p_period,'MM-YYYY'),'MM') ) MNTH, TO_CHAR(to_date(p_period,'MM-YYYY'),'YYYY') YER, P_PERIOD

from scsa_customer_budget

where to_date(p_period,'MM-YYYY') >= to_date(to_char(:date1,'MON-YYYY'),'MM-YYYY')

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center