By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,606 Members | 1,663 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,606 IT Pros & Developers. It's quick & easy.

Temp Table and SP Advise

P: n/a
Ks
Hi All,

I have a little scenario here, i am need of inserting some rows into a
temp table which will be returned by a procedure... Here is little
explanation

I am planning to make a proc A and a temp table in proc A.
I will be calling proc B from Proc A.
What i want is the data returned by Proc B should be inserted into Proc
A's Temp table.

Can any one suggest me on this...

A little help will be highly appreciated.

Thanx

Cheers!

Nov 29 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Ks (kp******@gmail.com) writes:
I have a little scenario here, i am need of inserting some rows into a
temp table which will be returned by a procedure... Here is little
explanation

I am planning to make a proc A and a temp table in proc A.
I will be calling proc B from Proc A.
What i want is the data returned by Proc B should be inserted into Proc
A's Temp table.


Just do it. The temp table created in A, will be visible from B.

I cover this in an article on my web site:
http://www.sommarskog.se/share_data.html

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Nov 29 '05 #2

P: n/a
Ks
Hi Erland Sommarskog

thanx for ur quick reply...

This thing i would like to bring it in ur knowledge that both the Proc
A and Proc B have been made independently. There is no direct link b/w
both of them. Just the data of B is to be filled in Temp Table of Proc
A.

Nov 29 '05 #3

P: n/a
Ks (kp******@gmail.com) writes:
Hi Erland Sommarskog

thanx for ur quick reply...

This thing i would like to bring it in ur knowledge that both the Proc
A and Proc B have been made independently. There is no direct link b/w
both of them. Just the data of B is to be filled in Temp Table of Proc
A.


Yes, that is not a problem. B should not create the table, just assume
that it exists.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Nov 29 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.