469,600 Members | 2,367 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,600 developers. It's quick & easy.

Select from Stored Procedure

Hi,


Please help. I am very new to SQL server.

I run :

sp_helprotect erwin123

Owner object grantee grantor protecttype action coloumn
dbo erwin123 developer_user dbo Deny Select (All+New)
dbo erwin123 laue dbo Grant Select(All+New)

If I Just want to get the 3rd column which in grantee, what manipulation on stored procedure can I use.

I've tried something like

select grantee from (exec sp_helpprotect erwin123) and it does not work.

Thanks in advance for your advice
Mar 15 '08 #1
4 1875
Delerna
1,134 Expert 1GB
Hi,
I've tried something like

select grantee from (exec sp_helpprotect erwin123) and it does not work.
Hi lawardy
You cannot query a stored procedure like that.
Mar 17 '08 #2
ck9663
2,878 Expert 2GB
You can try converting the sp into a table-function

-- CK
Mar 17 '08 #3
Hi,

I manage to do it by creating a Temp table. However it only work as long as the SP_* return only 1 rowset.

Something like SP_HELP which return multiple rowset may need another trick
Mar 19 '08 #4
ck9663
2,878 Expert 2GB
As everyone recommended, try function

-- CK
Mar 19 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Patrick | last post: by
1 post views Thread by anilcool | last post: by
2 posts views Thread by =?Utf-8?B?VGVycnk=?= | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.