Take a look at
Re: How to derive the result set using SQL Statement Message #
920889 and
Re: String search in all tables?? Message #
1065665 for an alternative.
>How do I loop through a result set using T-SQL?
>
>Something like this pseudo code:
>
>SELECT pk from mytable where fk = @fk
>
>foreach_row_in_result_above
>{
> do something with the fk from the row (pass fk to another SP)
>}
>
>
>Any help would be appreciated.
>
>Thanks,
>Einar
--sb--