Is it possible to access the result set returned from a stored procedure
For example,
begin
set @cursor_list = sp_spaceused 'a_table'
...loop through here...
end
I can't seem to find any information on accessing the "default result set(s)". Returned from a stored procedure.
What I really want is the output of sp_spaceused for all tables for a particular user.
Thanks
Tory

Using result sets from a stored procedure
mAcD
Noddy
You can use INSERT EXEC to store the result of stored proc into a temp table.
create table #t1 (name nvarchar(128), rows varchar(11), reserved varchar(18), data varchar(18), index_size varchar(18), unused varchar(18))
insert #t1 exec sp_spaceused 'tblTest1'
<do your loop>
drop table #t1
Carole Akoury
mralx
Tory