Click here to Skip to main content
15,894,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have revoked a role using the following statement :
revoke SELECT ON vb from SalesClerk
Now I want a SQL statement WHICH Would give me an denial message. This could be something like this :-
SELECT * FROM VB where role= 'SalesClerk'

But this is not working.....Can you suggest me something else?
Posted
Updated 3-Jan-11 1:32am
v4
Comments
Toniyo Jackson 3-Jan-11 7:33am    
Use pre tag only for code.

1 solution

You need to specify an OUTPUT parameter in your stored procedure parameter list, and set its value in the stored procedure.

Use google to find an appropriate example for your needs. I recommend the search phrase "t-sql return value from stored procedure", or "t-sql set variable based on query".

 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900