SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Dynamic Temp Table
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

PUTTU PATIL
Starting Member

India
7 Posts

Posted - 06/09/2014 :  11:02:26  Show Profile  Reply with Quote
Hi All,

I want to generate dynamic temp table so, from one strored procedure am getting an some feilds as shown below

CM_id,CM_Name,[Transaction_Month],[Transaction_Year],''[Invoice raised date],''[Payment Received date],''[Payout date],''[Payroll lock date]

for i want to generate table for the above feilds with datatype


please help me to do so.

Regards,
Abhishek Patil

PUTTU PATIL

James K
Flowing Fount of Yak Knowledge

3742 Posts

Posted - 06/09/2014 :  16:15:49  Show Profile  Reply with Quote
quote:
Originally posted by PUTTU PATIL

Hi All,

I want to generate dynamic temp table so, from one strored procedure am getting an some feilds as shown below

CM_id,CM_Name,[Transaction_Month],[Transaction_Year],''[Invoice raised date],''[Payment Received date],''[Payout date],''[Payroll lock date]

for i want to generate table for the above feilds with datatype


please help me to do so.

Regards,
Abhishek Patil

PUTTU PATIL

I didn't get what you meant by dynamic temp table. You can create a temp table and then use the INSERT..EXEC construct to insert the results of your stored proc into that table. See here: http://www.sommarskog.se/share_data.html
Go to Top of Page

PUTTU PATIL
Starting Member

India
7 Posts

Posted - 06/10/2014 :  01:52:01  Show Profile  Reply with Quote
Hi All,

I have created a stored procedure for retrieving column name, as shown below
CM_id, CM_Name, [Transaction_Month], [Transaction_Year], [Invoice raised date],[Payment Received date],[Payout date],[Payroll lock date]

now i trying to create a temporary table using the above generated coluimns from Stored Procedure with datatype.


PUTTU PATIL
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000