Skip to Main Content

SQL & PL/SQL

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Need to display 6 months variables column header based on the current month

I need to display the forecast sales based on current month said is May then i will like to display May, June, July, Aug, Sep, Oct and if more than 6 months it will rum all into final column as all. The column needs to be variable not fix, so if the current month is June, then need to display as June, July, Aug, Sep, Oct, Nov and more than 6 months will have another column to store it.

Attached is the data source and expected out that needed. I knew it must be done in Pivot but again I need variable column of six months only and more than 6 months need to display in separate column.

Anyone can helps me?

so.xls

Comments
Post Details
Added on May 27 2025
4 comments
182 views