Blogs Louis Davidson in Blogs Outputting Status In Your T-SQL Code The versatility of T-SQL allows you to create complex scripts to accomplish just about anything you need to do. In this blog post, Louis Davidson... 09 February 2018 5 min read
Kathi Kellenberger T-SQL Window Function Speed Phreakery: The FIFO Stock Inventory Problem Sometimes, in the quest for raw SQL performance, you are forced to sacrifice legibility and maintainability of your code, unless you then document your code... 16 March 2016 14 min read
Grant Fritchey Top 10 Most Common Database Scripts What are the scripts that a working DBA uses so often that they become part of the 'muscle memory'? Grant Fritchey asked the question on... 15 October 2015 14 min read
Gail Shaw How to Confuse the SQL Server Query Optimizer Gail Shaw examines three common forms of generic SQL that can and will confuse the SQL Server Optimizer to the point that it generates and... 09 September 2015 35 min read
Dwain Camps How to Avoid Conditional JOINs in T-SQL Relational databases go out of their way to execute SQL, however bad the crimes against Codd and relational theory within the query. The 'conditional join',... 07 September 2015 14 min read
Kathi Kellenberger T-SQL Window Functions Speed Phreakery Before SQL Server had SQL window functions, SQL Server developers had to use all manner of tricks and algorithms to come up with ways to... 27 August 2015 12 min read
Alex Kuznetsov Reusing T-SQL Code Database programmers are often caught in the paradox of wanting to implement business rules and complex functionality in one place only, but being concerned by... 28 May 2015 27 min read
Dwain Camps Using the T-SQL PERCENTILE Analytic Functions in SQL Server 2000, 2005 and 2008 Percentiles give meaning to measurements by telling you the percentage of the population being measured who get higher or lower values. They are now easier... 18 May 2015 27 min read
Phil Factor Documenting your SQL Server Database One of the shocks that a developer can get when starting to program in T-SQL is that there is no simple way of generating documentation... 06 May 2015 27 min read
Robert Sheldon Questions About T-SQL Control-of-Flow Language You Were Too Shy to Ask Surely, we all know how T-SQL Control-of-flow language works? In fact it is surprisingly easy to get caught out. What, for example, do the BREAK,... 26 January 2015 29 min read
Grant Fritchey Why Developers Need to Understand Execution Plans As a coder, the more you know about the business, the better code you're going to write. The more you know about the language in... 12 January 2015 30 min read
Robert Sheldon Questions About T-SQL Transaction Isolation Levels You Were Too Shy to Ask Every time you access a relational database to make a query, you have an important decision to make: What is the appropriate isolation level for... 04 December 2014 28 min read
Phil Factor Bitwise Operations in T-SQL How can you, in T-SQL, get a list of columns that have changed within a trigger? How can you see what bits are set within... 18 November 2014 22 min read
Scott Swanberg Exploring Your SQL Server Databases with T-SQL Most DBAs hoard their own favourite T-SQL scripts to help them with their work, often on a USB 'thumbdrive', but it is rare that one... 09 October 2014 40 min read
Dwain Camps Filling In Missing Values Using the T-SQL Window Frame Since SQL Server delivered the entire range of window functions, there has been far less justification for using the non-standard ex-Sybase 'Quirky Update' tricks to... 18 September 2014 18 min read
Robert Sheldon Questions about T-SQL Expressions You Were Too Shy to Ask Nobody seems to ask questions about SQL Expressions in forums, even though expressions can cause all sorts of problems. Even the books on T-SQL skate... 13 August 2014 43 min read
Dwain Camps Calculating and Verifying Check Digits in T-SQL A lot of numbers that we use everyday such as Bank Card numbers, Identification numbers, and ISBN codes, have check digits. As part of the... 11 July 2014 24 min read
Jes Borland SQL Server Indexed Views: The Basics Views are a valuable tool for the SQL Server Developer, because they hide complexity and allow for a readable style of SQL expression. They aren't... 12 February 2014 23 min read
Dwain Camps The Performance of the T-SQL Window Functions Window Functions in SQL greatly simplify a whole range of financial and statistical aggregations on sets of data. Because there is less SQL on the... 17 January 2014 16 min read
Dwain Camps Calculating the Median Value within a Partitioned Set Using T-SQL It is ironic that one of the most essential of statistical aggregations, the median, has been so difficult in the past to calculate efficiently in... 17 December 2013 12 min read