Hi
Check out the form of insert statement that calls exec
INSERT INTO <TABLE> execute_statement
i.e INSERT INTO <TABLE> EXEC stored_procedure
http://msdn.microsoft.com/library/de...asp?frame=true
John
"Jim Geissman" <jim_geissman@countrywide.com> wrote in message
news:b84bf9dc.0308291355.6af690b6@posting.google.c om...
> There's an SP that in effect returns a table -- it loops and executes
> statements like SELECT @field1, @Field2, @Field2
>
> Can I capture its results in a table? I know that if it were a FUNCTION
> that returned a table, that would be simple:
>
> INSERT ResultsTable SELECT * FROM dbo.Function (@Param1, @Param2)
>
> But how to do that if the code is a procedure rather than a function?