Inline Comments in complex SQL statements

Overview Documentation should be an inherent part of any database development project. Virtually everybody would agree with this. However, documentation is usually the first goal to be a victim of project pressure. “If you want to know what the code does, have a look at the code.” This is a very common view on missing … Read more

Formatting SQL Statements (Part 2)

Dieser Artikel in Deutsch… Introduction Developing SQL code follows a completely opposed paradigm compared to developing software code. While one single SQL statement may consist of hundreds of lines, software commands tend to be rather short and compact. You use many commands for achieving a goal in software development. In SQL server it is highly … Read more

Formatting SQL Statements (Part 1)

Dieser Artikel in Deutsch… Overview Capital letters are often used to emphasize single words. This applies, for example, to German as a language. Latin, Greek, … Although there are languages that do distinct between upper and lower case (with respect to nouns), it has nevertheless prevailed in most languages. Even in English you can sometimes … Read more

Editor Options in SSMS

Dieser Artikel in Deutsch… Overview Most editors of well-known development environments including SQL Server Management Studio (SSMS) use monospaced fonts. With that, each character occupies the same amount of horizontal space. Texts can be easily indented and aligned when using monospaced fonts. An efficient feature for aligning and indenting text elements is the Tab-key. By … Read more

Structuring and Formatting SQL Statements

Dieser Artikel in Deutsch… Overview Recently, I had to revise a Stored Procedure with nearly 2.000 lines of code. The procedure was edited by three developers, one after another. It contained sub statements for about 30 tables with varying degrees of complexity. But essentially all Sub-Statements were designed to fulfill a similar task. While all … Read more

Functional Design (Aesthetics) of SQL

Dieser Artikel in Deutsch… Overview A good programming style is the basis for readable and comprehensive source code and thus contributes substantially to the maintainability of software in the broadest sense. Well formatted code, definition and adherence to naming conventions are just a few criteria. The design (aesthetics) is subject to personal preferences of developers … Read more