>>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.
>
>Thanks Sergey. Is it more overhead to use a temp table than a cursor? When would you create a temp table instead of declaring a cursor?
You have a choice between a table varable and a temp table. I would use a table variable unless I have to use a temp table. I prefer it over cursors because it provides more flexibility:
I don't have to worry what kind of cursor to create
I can run selects agains temp table or update it if necessary
There's no limitaion on how to move between records. They can be processed in any order you can imagine.
--sb--