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 2000 Forums
 SQL Server Development (2000)
 SP

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-10-18 : 07:46:41
mahesh writes "Can we call a stored procedure from a stored procedure?
Can we use the output of first stored procedure into second?

I am having a sp A which is fetching some values from a few tables.
I have another sp B which is fetching some values from few other tables.
I need to join these two results and find out the common values

I dont want to create temp tables for those. Is it possible?"

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2005-10-18 : 07:56:13
hmm.. you can call one sp from the second sp
if you are using the outparameter of the other stored procedure then u can use
sp_executeSQl for the executing the procedure.. and get the value in the variable.. ..


Complicated things can be done by simple thinking
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-10-18 : 07:57:29
Combine the code into single sp and use Join to get common values

Madhivanan

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

- Advertisement -