Earlier this year, in one of my blog posts, I presented
Dynamic T-SQL Generator: a tool I developed that generates dynamic T-SQL based on a given static T-SQL script and vice versa.
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.