I have an SQL Table which consists of 1 column only
Column Name
A
A
A
B
B
B
B
C
D
D
E
I need an SQL Code that returns the cut points. For the table above, it will return this:
Column Name
3
7
8
10
11
3 is the end of A’s and 7 is the end of B’s and 8 is the end of C’s and so on…
Let’s see what can you come up with :=)
Assuming the data can be sorted on your
Column, the plan is to generate arow numberfor each row and do agroup byto retrieve your data points.SQL Server 2000
SQL Server 2005