My current table (3 million records) has this structure.
PN Grp Seq
----------------------
111 0 10
111 0 20
111 0 30
111 1 10
111 1 20
111 1 30
111 1 40
222 0 10
222 0 20
222 0 30
222 1 10
222 1 20
222 1 30
.
.
.
I need to produce this output without using a cursor. Resequence the Seq field each time the PN field changes, regardless of which group.
PN Grp Seq
----------------------
111 0 1
111 0 2
111 0 3
111 1 4
111 1 5
111 1 6
111 1 7
222 0 1
222 0 2
222 0 3
222 1 4
222 1 5
222 1 6
.
.
.
Any ideas on how to achieve this result?
Thanks in advance.
PN Grp Seq
----------------------
111 0 10
111 0 20
111 0 30
111 1 10
111 1 20
111 1 30
111 1 40
222 0 10
222 0 20
222 0 30
222 1 10
222 1 20
222 1 30
.
.
.
I need to produce this output without using a cursor. Resequence the Seq field each time the PN field changes, regardless of which group.
PN Grp Seq
----------------------
111 0 1
111 0 2
111 0 3
111 1 4
111 1 5
111 1 6
111 1 7
222 0 1
222 0 2
222 0 3
222 1 4
222 1 5
222 1 6
.
.
.
Any ideas on how to achieve this result?
Thanks in advance.