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 2005 Forums
 Transact-SQL (2005)
 How to call procedure in another procedure.

Author  Topic 

pmotewar
Yak Posting Veteran

62 Posts

Posted - 2009-04-28 : 08:05:27
Hi,
I have 2 procedures
say tempA and TempB

TempA return something and i want to use this output in TempB procedure. TempA procedure is returning data from # Temporary table.

any help will appriciate

Pankaj

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-04-28 : 08:44:42

The code should be something like this

Create procedure TempB
.
.
.

create table #temp(.....)

insert into #temp
EXEC TempA

select * from #temp


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -