Alvin Sebastian (asebastian@cmri.usyd.edu.au) writes:
[quoted text, click to view] > I want to create a stored procedure which will extract the "GroupName"
> from the record returned by "sp_helpuser". In order to do this I need
> to execute "sp_helpuser" which returns the entire record. I want to
> just extract the "GroupName" from the record and return it to my
> application. How do I go about this?
Either you access sysusers directly, you can use the INSERT EXEC construct:
INSERT #temp (...)
EXEC sp_helpuser
You need to create #temp so that it agrees with the output from sp_helpuser.
--
Erland Sommarskog, SQL Server MVP, sommar@algonet.se
Books Online for SQL Server SP3 at