calling SP inside SP 
Author Message
 calling SP inside SP
hi
can i call one PS inside another
like

select * from X
where
<cond1> and exists( < another SP>)

regards
sunny



Wed, 04 May 2005 03:53:00 GMT
 calling SP inside SP

Yes you can definitely call a stored procedure from another.  Regarding your
exists condition, you are referring to the recordset output of the sproc,
correct?  Not the actual existance of the sproc.  I would recommend you
execute the contents of the sproc into a temp table, i.e.,

insert into #yourTempTable (col1, col2, col3)
exec yourSproc input1, input2, etc.

Then use the temp table in the exists condition to qualify the resultset
against table X.

hth
Eric


Quote:
> hi
> can i call one PS inside another
> like

> select * from X
> where
> <cond1> and exists( < another SP>)

> regards
> sunny



Wed, 04 May 2005 04:16:11 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Calling SP from inside another SP

2. How Get Output Param from Inside SP, calling another SP

3. How can I call a SP inside a SP without the owner name

4. function calls inside SP exec call

5. Use a sp to Make a view with a sp inside

6. sp inside sp

7. Using a SP inside another SP

8. Check if parameter supplied to SP inside SP

9. calling a stored procedure inside another sp

10. CALLING SP INSIDE A TRIGGER

11. Call DLL inside SP

12. call sp from within another sp


 
Powered by phpBB® Forum Software