sp inside sp 
Author Message
 sp inside sp
hello,

how can I run an sp (that takes a parameter) form within another sp?

something like:

PARENT SP....

INSERT
INSERT

exec SP2 (SELECT TOP 1 Product_id FROM ...)

-- the Product_id in the ( ) is the param I want to pass into SP2

Thanks!



Fri, 06 May 2005 06:01:54 GMT
 sp inside sp

[posted and mailed, please reply in news]

Quote:

> how can I run an sp (that takes a parameter) form within another sp?

> something like:

> PARENT SP....

> INSERT
> INSERT

> exec SP2 (SELECT TOP 1 Product_id FROM ...)

You cannot use expressions as parameters in calls to stored procedures;
only constants and variables. Thus



--

I support PASS - the definitive global community for SQL Server
professionals - http://www.sqlpass.org
The PASS Community Summit is in Seattle Nov 19-22, I'll be there. And you?



Fri, 06 May 2005 07:04:04 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. calling SP inside SP

2. Check if parameter supplied to SP inside SP

3. Calling SP from inside another SP

4. Using a SP inside another SP

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

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

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

8. SP:ExecContextHit,SP:CacheMiss,SP:CacheInsert

9. CALLING SP INSIDE A TRIGGER

10. IT IS WORK IN QA AND NOT INSIDE SP

11. Stored procedure inside another SP

12. calling a stored procedure inside another sp


 
Powered by phpBB® Forum Software