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 ...