Tuesday, March 06, 2012 12:44 PMI am using one temp table in one stored proc,Can i use same temp table in other stored proc?
Tuesday, March 06, 2012 12:48 PM
Only if temp table is created in first sp and 2nd sp is called with in 1st sp.. e.g bellow
create proc sp1 as create table #t(c char(5)) insert into #t(c) values('a'),('b') exec sp2 create proc sp2 as select * from #t exec sp1
Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker
- Marked As Answer by Naresh_a Tuesday, March 06, 2012 4:32 PM
Tuesday, March 06, 2012 12:49 PMAnswererRead Erland's article http://www.sommarskog.se/share_data.html
Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/