Put stored procedure result set into a table-- any shortcuts besides INSERT INTO...EXEC?
Posted
by larryq
on Stack Overflow
See other posts from Stack Overflow
or by larryq
Published on 2010-03-17T19:52:12Z
Indexed on
2010/03/17
20:01 UTC
Read the original article
Hit count: 314
Hi everyone,
I'm creating a temp table that's the result of a stored procedure's result set. Right now I'm using the create table
statement, followed by insert into....exec
.
It gets the job done but I was curious if there are other ways of going about this? I wish it were possible to run a select into
, with the stored procedure's result set serving the role of the select statement, so that I wouldn't have to write a create statement beforehand (so that if the stored proc's columns change, there wouldn't be any modifications needed.)
If there are other ways to go about this that might fit my needs better I'd love to hear about them. Thanks very much.
© Stack Overflow or respective owner