Hi.
My table is in the order I want it to be, but I need to update a spare field in each row with an incremental counter, so that I can do an "order by".
ie Field1 Field2 Spare Field
Row 1 AAA 02 17 2001 Set value to 1
Row 2 XXX 02 12 2001 Set Value to 2
Row 3 MMM 30 01 2001 Set Value to 3
Row 4 BBB 14 02 2001 Set value to 4
Row 5 and so on
In fact, the counter can be ascending or descending, and could even be the exact time of the update, just as long as I have a true sequence.
Best Wishes
Scotty
We have Sybase 11.5
My table is in the order I want it to be, but I need to update a spare field in each row with an incremental counter, so that I can do an "order by".
ie Field1 Field2 Spare Field
Row 1 AAA 02 17 2001 Set value to 1
Row 2 XXX 02 12 2001 Set Value to 2
Row 3 MMM 30 01 2001 Set Value to 3
Row 4 BBB 14 02 2001 Set value to 4
Row 5 and so on
In fact, the counter can be ascending or descending, and could even be the exact time of the update, just as long as I have a true sequence.
Best Wishes
Scotty
We have Sybase 11.5