I would use procedural code for the task.
>hi all,
>
>i have table have more 20000 records
>
>have fields as flag from 1 to 9,
>
>i need to replace all fields have flage= 1 numbers from 1 to the last record have flage= 1 as ex.. 145
>
>flage= 2 take numbers from 146 to end flage=2 as last record is 445
>
>flage= 3 from 446...etc
>
>thanks
If it's not broken, fix it until it is.
My Blog