Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Only display Current month and previous months

SHR_ORACAug 4 2016 — edited Aug 8 2016

Hi

I have a select list

It populates all the months based on the following query:

SELECT TO_CHAR(ADD_MONTHS(SYSDATE,(level-1)*-1),'Mon') d

      ,TO_CHAR(ADD_MONTHS(SYSDATE,(level-1)*-1),'Mon') r

FROM  DUAL

CONNECT BY level < 13

ORDER BY level

I want to just display current months and previous months, not the future months based on sysdate.

Any help would be greatly appreciated.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 5 2016
Added on Aug 4 2016
4 comments
37,222 views