Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

find breaks in serial ranges

$
0
0

Hi All,

I have a range of serial numbers in a table.

I want a query that will return the top 8 but it should break it into start and End  columns where there is a break it should

return it on a different line.

E.G

Id   Serial

1     89453459000000

2     89453459000001

3     89453459000004

4     89453459000005

5     89453459000007

6     89453459000008

7     89453459000012

8     89453459000013

This should be

Start                                            End

89453459000000                       89453459000001

89453459000004                       89453459000005

89453459000007                       89453459000008

89453459000012                       89453459000013

Please assist urgently


BR


CRM Manager


Viewing all articles
Browse latest Browse all 23857

Trending Articles