By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,843 Members | 2,324 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,843 IT Pros & Developers. It's quick & easy.

How to stored a stored procedure's results into a table

P: n/a

Hi, How can I store a stored procedure's results(returning dataset) into
a table?

Bob
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Bob James" <BJ@system.com> wrote in message news:41**********@127.0.0.1...

Hi, How can I store a stored procedure's results(returning dataset) into
a table?

Bob
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


insert into dbo.MyTable
exec dbo.MyProc @parm1 = 'foo'

Where dbo.MyTable already exists and matches the structure (columns and data
types) of the procedure's result set. But there are a number of issues with
this approach:

http://www.sommarskog.se/share_data.html#INSERTEXEC

If you read the whole article you might find one of the other approaches
suits your needs better anyway, so you can avoid those issues.

Simon
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.