Well, I have to create a procedure which calls nested procedures to reduce the work again and store the output of the nested stored procedure in the temporary table.
Here are the few steps taken by me to achieve this task
Suppose you have stored procedure named sp_FirstProcedure and sp_SecondProcedure
As I have move my blog from here please visit for detail.
for future reference
sorry for any inconvenience
Rana






isnt there supposed to be a way of creating and inserting into a temp table in one step?
By: stan on October 10, 2007
at 7:51 pm
Yes, you can create and insert values in temp table but using select query not stored procedure.
i.e.
Select * into #temp from Table
You can also insert the values into temp table from Stored Procedure but Temp table should created before.
i.e.
Insert into #tempCityEmp Exec sp_First
Hope this is your answer.
If not please eloborate in detail what exactly you are asking and what is the benefit to do this in one line and why ?
Thank you very much for your comments.
regards,
Rana
By: codeproject on October 11, 2007
at 9:14 pm
you did not give proper syntax
actually i want to save the data retrived from [sp_help table_name] in to a temporary table pls reply me fast
By: saritha on August 1, 2008
at 5:06 am
create @temp_table table (all fields)
Insert into @temp_table
EXECUTE Sp_Travel_RaReturn_Table @detail,’|',’,’
here
Sp_Travel_RaReturn_Table is storeprocedure for returning values in table format.
Upper statement is not working in my store procedure. Even same statement is working in another storeprocedure.. All details are same in both storeprodecure
–Chetan Patel
By: Chetankumar on September 19, 2008
at 9:46 am
Select * into #temp from Table
will avobe works in sql server? I have little doubt on it. If so please let me know will help me a lot.
thanks
Deb
By: debasish on March 18, 2009
at 11:30 am