472,142 Members | 1,021 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,142 software developers and data experts.

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 1920
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 leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.