I want to get the next row value in current row. Just like LEAD()
does in latest SQL Server. But I am currently using SQL Server 2000. And I don't have any other option.
Actual scenario is:
TableRule:
# HeadNo | NextHeadNo | NoFrom
-----------+------------+------------
1 AA | AB | 1
2 AB | AC | 1
3 AC | AX | 1
4 AD | AE | 1 ****and so on
I want to update NextHeadNo
value based on next value on HeadNo
.
So as per the data Row-3
should get update AX ➪ AD
.
I have around 1000 records to update for single time.
I hope anyone can help me with this.