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?
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
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
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
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
Declare @GroupTable table
(
GroupId int ,
GroupName nvarchar(50),
DebitCon int,
ClosingBalance decimal(18,2)
)
Insert Into @GroupTable Exec Acc_ProfitAndLossDemoversion 1,219,@FromDate ,@Todate,1,@FinacialYear,1,Null,Null,Null
Insert Into @GroupTable Exec Acc_ProfitAndLossDemoversion 1,219,@FromDate ,@Todate,1,@FinacialYear,2,Null,Null,Null
Greetings! This is my 1st comment here so I just wanted
to give a quick shout out and say I really enjoy reading through your articles.
Can you recommend any other blogs/websites/forums
that go over the same subjects? Thank you so much!
Hmm it looks like your blog ate my first comment (it was super long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying
your blog. I too am an aspiring blog writer but I’m still new to everything. Do you have any recommendations for novice blog writers? I’d really appreciate it.
I read this post completely about the difference of
newest and earlier technologies, it’s amazing article.
I read this article completely concerning the comparison of most
recent and preceding technologies, it’s awesome article.