Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
PUTTU PATIL
Starting Member
7 Posts |
Posted - 2014-06-09 : 11:02:26
|
Hi All, I want to generate dynamic temp table so, from one strored procedure am getting an some feilds as shown belowCM_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 datatypeplease help me to do so.Regards,Abhishek PatilPUTTU PATIL |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2014-06-09 : 16:15:49
|
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 belowCM_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 datatypeplease help me to do so.Regards,Abhishek PatilPUTTU 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 |
|
|
PUTTU PATIL
Starting Member
7 Posts |
Posted - 2014-06-10 : 01:52:01
|
Hi All, I have created a stored procedure for retrieving column name, as shown belowCM_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 |
|
|
|
|
|
|
|