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