Sean Lange (3/19/2015)
Nuhamovici (3/19/2015)
Can you share the code that does this? Calling sp_who from within a function?Why? What could you possibly gain from calling a stored proc from within a function? You should instead get rid of the function entirely.
If you can explain what you are trying to do we can help you find a better approach than calling a stored proc from a function.
It makes it easy to filter when you're in a hurry... real easy.
--Jeff Moden
Change is inevitable... Change for the better is not.