SQL*Plus (MOSC)

MOSC Banner

to get previous year data 2019

in SQL*Plus (MOSC) 4 commentsAnswered

Hi All,

Working in OPM 12.1.3

Please i need help to get data of 2019 from below query

select * from ra_customer_trx_all

where trunc(to_char(trx_date,'YYYY')) = nvl(trunc(to_char(:p_date_to,'YYYY')-1), to_char(add_months (trunc (sysdate, 'YEAR'), -1 ) ,'YYYY')) 

and to_number(to_char(trx_date,'MM')) <= nvl(to_number(to_char(:p_date_to,'MM')), to_char(add_months (trunc (sysdate, 'MONTH'),-1 ) ,'MM'))


Regards

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