SQL Server: Create table to hold result of stored procedure

1128930 pts.
Tags:
SQL Server
Stored Procedures
With SQL Server, I usually write a query like this:
create table #table_name
(
    column1 int,
    column2 varchar(200)
    ...
)

insert into #table_name
execute some_stored_procedure;
But here's my issue: When creating a table to have the right syntax as the result of the stored procedure is too long of a task. Can I do this another way? Possibly easier?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • carlosdl
    You would need to clarify what you mean.  Tables don't have "syntax".

    Can you show us exactly what you do, and why it would be a long task?
    84,580 pointsBadges:
    report
  • ToddN2000
    Are you referring to the table name? post the name you are trying to use  so we can tell if it's a valid format.
    128,175 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: