okay, thanks guys. did think of the temp table thing, but thought it'd be more nice and "inline" if you could get the results directly from exec another procedure there and then. Thanks though!
stiej,
Just look up 'SQL User-Defined Functions' in books on line.
The bottom line is that you can create a function whose return value is a table - and you can use that return value just as if it were a table or view as in select * from dbo.myUdf(parm).
There were many, many improvements from version 7 to 2k, but I have to admit that user defined functions are my favorite.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.