I need to incorporate a grant statement in my stored procedure because it is using dynamic SQL.
The syntax I am entering is,
grant select on tablename to "Admin Role"
When running this on it's own it works fine. But when attempting to put in my stored procedure I get the error message,
Server: Msg 170, Level 15, State 1, Procedure sp_rpt_data, Line 17
Line 17: Incorrect syntax near 'Admin Role'.
What am I doing wrong ?
The syntax I am entering is,
grant select on tablename to "Admin Role"
When running this on it's own it works fine. But when attempting to put in my stored procedure I get the error message,
Server: Msg 170, Level 15, State 1, Procedure sp_rpt_data, Line 17
Line 17: Incorrect syntax near 'Admin Role'.
What am I doing wrong ?