Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 how to share table between stored procedure?

Author  Topic 

moshiksa1
Starting Member

1 Post

Posted - 2012-07-14 : 12:54:28
hi,

i have a stored procedure which creates a table and fills it up, this stored procedure call it self again and continue fill it up with more data.

the problem is that between the calls the data on the temp table doesn't save. my question is how can i share a temp table which is created

in the stored procedure between a subsequent calls of the same stored procedure, or between a different stored procedure?

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-07-14 : 13:07:59
Take a look at Sommerskog's article here: http://www.sommarskog.se/share_data.html in particular, the section "Using a Table". It is very well-written and comprehensive and explains it with examples way better than anything I would be able to post here.

Go to Top of Page
   

- Advertisement -