Hugh Bin-Haad TSQL Pivot Rotations using only REPLACE Pivoting SQL Server tables is always awkward, even with the PIVOT and UNPIVOT operators. If you want to get the... 01 April 2013 8 min read
Kathi Kellenberger Solving Complex T-SQL Problems, Step-By-Step What should you do if your first, most intuitive solution to a problem ends up scanning the data more than... 18 March 2013 19 min read
Robert Sheldon SQL Server 2012 Window Function Basics For some time, Microsoft had a few window functions, but not the full set specified in the SQL 2003 standard.... 05 March 2013 21 min read
Joe Celko UNIQUE Constraints in SQL Here is an in-depth look at an underused constraint, UNIQUE, that can increase the performance of queries and protect data... 10 January 2013 22 min read
Joe Celko Row Sorting in SQL It should be easy to model a game of poker in SQL. The problem is, however, that you need to... 30 November 2012 10 min read
Joe Celko Matrix Math in SQL Relational Databases have tables as data structures, not arrays. This makes it tricky and slow to do matrix operations, but... 17 September 2012 10 min read
Greg Lucas Test-driven Database Development – Why tSQLt? Test-Driven Development (TDD) has a good track record in application development, but is less well-established in database development work. This... 21 August 2012 16 min read
Seth Delconte NULL-Friendly: Using Sparse Columns and Column Sets in SQL Server Sparse columns and column sets in SQL Server 2012 provide a way of accomodating the less-structured data that has always... 10 July 2012 14 min read
Phil Factor Handling Constraint Violations and Errors in SQL Server The database developer can, of course, throw all errors back to the application developer to deal with, but this is... 29 June 2012 27 min read
Joe Celko SQL View: Beyond the Basics Following up from his popular article, SQL View Basics, Joe delves into the main uses of views, explains how the... 28 May 2012 13 min read
Phil Factor The TSQL of CSV: Comma-Delimited of Errors Despite the neglect of the basic ODBC drivers over the years, they still afford a neat way of reading from,... 13 April 2012 20 min read
Joe Celko Bin Packing Problems: The SQL The 'bin packing' problem isn't just a fascination for computer scientists, but comes up in a whole range of real-world... 22 March 2012 10 min read
Jeremiah Peschka SQL Server Functions: The Basics SQL Server's functions are a valuable addition to TSQL when used wisely. Jeremiah provides a complete and comprehensive guide to... 10 November 2011 41 min read
William Brewer Database Source Control – The Cribsheet As part of our long-running Cribsheet series, we asked William to come up with a brief summary of what was... 08 November 2011 25 min read
Joe Celko Voting Paradoxes: a SQL Stumper Voting systems can become very complex, and some of them are easy to manipulate by tactical voting. Joe takes a... 28 October 2011 9 min read
Joe Celko Mimicking Network Databases in SQL Unlike the hierarchical database model, which created a tree structure in which to store data, the network model formed a... 26 September 2011 11 min read
Joe Celko Mimicking Magnetic Tape in SQL The sequential nature of early data storage devices such as punched card and magnetic tape once forced programmers to devise... 17 August 2011 10 min read
Phil Factor SQL Programmer’s workshop Phil Factor records, as closely as possible, the twists and turns of creating a SQL Server T-SQL stored procedure, describing... 05 August 2011 26 min read
T-SQL Programming Solomon Rutzky in T-SQL Programming CLR Performance Testing Are Common Language Runtime routines in SQL Server faster or slower than the equivalent TSQL code? How would you go... 21 July 2011 19 min read
Phil Factor How to develop TSQL Code The basic texts for developing SQL code tend to leave unsaid the basic techniques for building routines such as stored... 24 June 2011 15 min read