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!

Find the ranges within a table

User_SPVYVSep 27 2016 — edited Sep 28 2016

Hi:

I've a table with serial numbers and I need to find how many ranges of serials are there. The are 3.4 million serials in my table. Sample table structure and output table is as below:

TABLE_A

SERIAL

1018

1019

1020

1021

20288

20289

20290

3099

891111

891112

891113

891114

Output

Serial

1018-1021

20288-20290

3099

891111-891114

Can anyone help me please.

Thanks/Tanvir

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2016
Added on Sep 27 2016
19 comments
1,165 views