I wouldn't exactly call that nesting EXEC. This is really just wrapping dynamic SQL...
Now what would be really useful would be if you could put those two result sets into two separate tables. Or if you could do things like this:
IF EXISTS (EXEC SPName) ...
or
SELECT
FROM
Table T
OUTER APPLY (EXEC SPName T.Value) X
commented on Jun 14 2011 11:32AM