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!

Query to split count into multiple rows

Rakesh AdepuApr 19 2017 — edited Apr 25 2017

Hi,

I have data in my table: ORDER_LABEL_TBL like below:

ORDER_NUM MODEL            QUANTITY  BEGIN_SEQ  END_SEQ

----------           ----------             ---------        ---------           ---------

  1242          GEH50DEEDSCB    5               50001             50005

My requirement: I want to display rows based on quantity like below:

ORDER_NUM MODEL            QUANTITY  BEGIN_SEQ  END_SEQ

----------           ----------             ---------        ---------           ---------

  1242          GEH50DEEDSCB    5               50001             50001

  1242          GEH50DEEDSCB    5               50002             50002

  1242          GEH50DEEDSCB    5               50003             50003

  1242          GEH50DEEDSCB    5               50004             50004

  1242          GEH50DEEDSCB    5               50005             50005

Please help me to form a query to get the above result.

Thanks,

Rakesh.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 23 2017
Added on Apr 19 2017
7 comments
1,990 views