Link to home
Start Free TrialLog in
Avatar of Jim Horn
Jim HornFlag for United States of America

asked on

Is there a way to exec SP into a temp table?

Hi all

I'm doing some troubleshooting, and I'd like to insert the return set of a stored procedure into a temp table.   Since it's 75 columns, I'd rather not do a CREATE TABLE and define every column.

Is there a way to 'SELECT * INTO #tmp FROM exec sp_my_proc'?

SQL 2008R2.

Thanks in advance.
Jim
SOLUTION
Avatar of s_chilkury
s_chilkury
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial