Hi,
I want call a stored procedure A that reurns a single value from another
Stored Proc B. Stored Proc B must use the returned value from Stored Proc A
as an input
SOS
create proc usp_SprocB
as
return -1
go
create proc usp_SprocA
as
declare @.retValB int
exec @.retValB = usp_SprocB
return @.retValB * 105
go
declare @.retVal int
exec @.retVal = usp_SprocA
select @.retVal
hth
Eric
Givosky wrote:
> Hi,
> I want call a stored procedure A that reurns a single value from
> another Stored Proc B. Stored Proc B must use the returned value from
> Stored Proc A as an input
> SOS
|||Hi ,
I used the other option.
I made Stored Proc A a Function A
and call it from Stored Proc B
e.g
Stored Proc B
Select * from
XX where XX.ID in (Select * from Function A(Param1) )
"Eric Sabine" wrote:
> create proc usp_SprocB
> as
> return -1
> go
> create proc usp_SprocA
> as
> declare @.retValB int
> exec @.retValB = usp_SprocB
> return @.retValB * 105
> go
> declare @.retVal int
> exec @.retVal = usp_SprocA
> select @.retVal
> hth
> Eric
>
> Givosky wrote:
>
>
Sunday, March 11, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment