Dynamic T-SQL can be used in many cases when you develop SQL Server routines. An example is embedding T-SQL scripts in SQL Server functions and stored procedures (i.e. sp_send_dbmail).
As i believe that the Technical Community might find the tool useful, I decided to create a relevant open source project on CodePlex.
Feel free to visit my project’s page on CodePlex and provide your valuable feedback!
Here’s a screenshot of the tool:
Here’s the link to Dynamic T-SQL Generator.