all groups > sql server (alternate) > november 2005 >
You're in the

sql server (alternate)

group:

Temp Table and SP Advise


Temp Table and SP Advise Ks
11/29/2005 2:05:26 AM
sql server (alternate): 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!
Re: Temp Table and SP Advise Ks
11/29/2005 3:02:14 AM
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.
Re: Temp Table and SP Advise Erland Sommarskog
11/29/2005 10:09:42 AM
Ks (kpunjani@gmail.com) writes:
[quoted text, click to view]

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, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
Re: Temp Table and SP Advise Erland Sommarskog
11/29/2005 11:31:21 AM
Ks (kpunjani@gmail.com) writes:
[quoted text, click to view]

Yes, that is not a problem. B should not create the table, just assume
that it exists.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
AddThis Social Bookmark Button