hi - I have a query that has this structure...
The numbers aren't important here, but the records are properly ORDERed BY A, B1, B2, B3, C1, C2.
The actual query has about 1000 records.
I need help adding a column that increments from 1, but that restarts at each new value of A. In the sample shown, the revised query output should look like...
Thanks in advance for any assistance.
Teach314
Code:
[b] qryTEST
A B1 B2 B3 C1 C2[/b]
3 2 0 0 6 0
3 2 0 0 6 1
3 2 1 1 4 2
3 3 1 0 2 6
5 0 0 1 3 2
5 0 4 0 9 1
5 1 0 1 0 0
The numbers aren't important here, but the records are properly ORDERed BY A, B1, B2, B3, C1, C2.
The actual query has about 1000 records.
I need help adding a column that increments from 1, but that restarts at each new value of A. In the sample shown, the revised query output should look like...
Code:
[b]
A Rank B1 B2 B3 C1 C2[/b]
3 1 2 0 0 6 0
3 2 2 0 0 6 1
3 3 2 1 1 4 2
3 4 3 1 0 2 6
5 1 0 0 1 3 2
5 2 0 4 0 9 1
5 3 1 0 1 0 0
Thanks in advance for any assistance.
Teach314