Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 retrieving data from system store proc

Author  Topic 

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-09-06 : 04:25:22
hi,

how do you retrieve a certain field from a system stored procedure returning values?

example: exec sp_helprotect 'username'
i only want the groupname retrieved.

nr
SQLTeam MVY

12543 Posts

Posted - 2004-09-06 : 08:10:08

create table #a (Owner varchar(128), Object varchar(128), Grantee varchar(128), Grantor varchar(128), ProtectType varchar(128), [Action] varchar(128), [Column] varchar(128))
insert #a exec sp_helprotect 'username'

Then pick what you need from the temp table

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2004-09-06 : 08:16:39
master..sp_helptext sp_helprotect
and see how M$ does it.

rockmoose
/* Chaos is the nature of things...Order is a lesser state of chaos */
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-09-06 : 23:16:20
LOLZ, i actually read the entire code and some of the values were returned from the application.

thanks nr, i guess i really need to create the table

quote:
Originally posted by rockmoose

master..sp_helptext sp_helprotect
and see how M$ does it.

rockmoose
/* Chaos is the nature of things...Order is a lesser state of chaos */

Go to Top of Page
   

- Advertisement -