>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?