sp_ExecuteSQL

How easy or difficult to write dynamic SQL ? TIP#110

This is one of the challenge for most of the developer to write dynamic SQL. Generally we follow the approach of string concatenation. This seems very easy but we need to cast the  parameters in VARCHAR and sometimes we stuck in single code. I am sure this happened with all of us.  Let’s understand first …