Hi
I am using store procedure that generate report from various table, the problem is ,i have to give number for a ceratin values in column. The line column should check the num row , if the current row and next row values same then increment the line column. or any other methods also welcome.
num | total | line
AB01 | 77 | 1
AB01 | 77 | 2
AB01 | 77 | 3
CC02 | 123 | 1
DC03 | 33 | 1
Select
(cast(num.customer + id) as num,
num.total
line->?
from customertable as num