mjbkm (9/24/2011)
Hello. This post was a huge help for me. I am able to get it to work in a stored procedure. Is it possible in a function? Cannot get the same similar code to work in a function.Thank you in advance.
Nope... not possible. You cannot use dynamic SQL in a function.
Shifting gears a bit... what do you want the function to do?
--Jeff Moden
Change is inevitable... Change for the better is not.