Is there any way to access the recordset from an existing sp called in another sp. For instance:
declare @user varchar(100),
@pswd varchar(15)
declare @crsr cursor
set @crsr = cursor for exec ext_storedproc
open @crsr
fetch next from @crsr
into @user, @pswd
While (@@fetch_status = 0)
BEGIN
select 'record:', @user, @pswd
End
close @crsr
deallocate @crsr
I know I can use a select statement instead of executing an existing stored procedure but then I have to maintain the code in two places.
declare @user varchar(100),
@pswd varchar(15)
declare @crsr cursor
set @crsr = cursor for exec ext_storedproc
open @crsr
fetch next from @crsr
into @user, @pswd
While (@@fetch_status = 0)
BEGIN
select 'record:', @user, @pswd
End
close @crsr
deallocate @crsr
I know I can use a select statement instead of executing an existing stored procedure but then I have to maintain the code in two places.