|
Home > Archive > Microsoft SQL Server forum > November 2005 > Temp Table and SP Advise
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Temp Table and SP Advise
|
|
|
| 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!
| |
| Erland Sommarskog 2005-11-29, 7:23 am |
| Ks (kpunjani@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, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
| |
|
| 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.
| |
| Erland Sommarskog 2005-11-29, 7:23 am |
| Ks (kpunjani@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, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
|
|
|
|
|