October 10, 2007 at 3:39 am
I want to execute the results of the Stored Procedures?
Assume, a procedure which returns the following output
results
grant execute on emp to user1
grant execute on emp1 to user1
There is system stored procedure which executes the results of another procedure, by means of that i can grant execution of on emp table to user1.
Long back I have used the system stored procedure, but now i dont remember it.
Can u help me out?
October 10, 2007 at 4:02 am
There is an undocumented stored procedure sp_execresultset in SQL Server 2000, but unfortunately it wasn't carried over to SQL Server 2005. Is this what you were thinking of?
I think there's probably a workaround - you could massage the SP results into a single string and then use sp_executesql.
John
October 10, 2007 at 5:47 am
Was cracking my head for a while..Thanks a lot john.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply