Thanks for the input guys!
It is not possible to do what I want, I have tested. Perhaps in the new release of SQL Server.
The reason I am trying to avoid building a string then executing (as a statement or stored procedure), is because SQL server cannot compile and optimize the code. Trying to get the best perfomance. If I find any other solution, I will be happy to share.
Thanks again,
Jim
|