Working with dynamic SQL is all well and good, but avoid the risks that can lead to your code being susceptible to a SQL injection attack. As much as making your T-SQL work smarter for you, a la ...
Results that may be inaccessible to you are currently showing.
Hide inaccessible results