Tables can be populated with data from result set of stored procedure. Method can be applied to regular, temporary and global temporary tables but table variables can not be populated in this fashion.
INSERT INTO [YourTableName](CommaSeparatedColumnsName)
EXECUTE YourStoredProcedureNameHere CommaSeparatedParameterValuesNote: Number of input and output columns, as well as their datatypes must be same.
I am regular visitor of blogs, but i must say that content which i find in your blog is outstanding.i will love to visit your blog regularly
ReplyDeletehttp://supernsetips-news.blogspot.com
=================================================
How do you get around the error "An INSERT EXEC statement cannot be nested." which inevitably occurs?
ReplyDeletehttp://www.sommarskog.se/share_data.html#INSERTEXEC
ReplyDelete