Clean up SQL code from variables you don’t use

Writing and maintaining simple code for stored procedures and functions has never been a problem. However, maintaining complex code, with dozens of parameters and variables, and thousands of rows of SQL statements is. One of the things that the life make easier is to have clean code – without unnecessary and unused parameters and values.

Removing a parameter or variable from code in a production database can cause some problems. They can be easily solved by applying the original object code from a database backup, assuming it can afford the luxury of downtime.

April 4, 2013

How to quickly convert SQL code to language-specific client code

Integrating SQL Server with business infrastructure often requires that developers prepare T-SQL code for use within various client codes, such as C#, PHP, and Perl. This means adding language specific code that will be inserted before and after every SQL statement, as well as escape characters for quotes and code to terminate a line, so that the other languages can parse and execute it correctly. Updating the code manually is a time-consuming process prone to mistakes.

April 4, 2013