Unfortunately, there're cases when you have to process each record separately but you have to exhaust all set oriented approaches first..
>Right. Then the tow results are close and while is faster. On my machine w/o PK:
>While:9184
>Cursor: 186
>
>with PK:
>While: 126
>Cursor:170
>
>What I believe he needed neither while nor cursor:) but who knows.
--sb--