Phil Factor On Comparing Tables in SQL Server How do you compare two SQL tables? Every SQL Developer or DBA knows the answer, which is 'it depends'. It... 29 May 2014 20 min read
Phil Factor Producing JSON Documents from SQL Server queries via TSQL Although SQL Server supports XML well, XML's little cousin JSON gets no love. This is frustrating now that JSON is... 06 May 2014 24 min read
Phil Factor Searching for Strings in SQL Server Databases Sometimes, you just want to do a search in a SQL Server database as if you were using a search... 15 April 2014 20 min read
Joe Celko Database Normalization Basics The task of Database Normalization doesn't have to be painful, especially if you follow Old Mother Celko's Normalization Heuristics.… 07 April 2014 20 min read
Joe Celko On Handling Dates in SQL The calendar is inherently complex by the very nature of the astronomy that underlies the year, and the conflicting historical... 06 March 2014 16 min read
Dwain Camps Calculating Gaps Between Overlapping Time Intervals in SQL There are a number of real-life reporting tasks in SQL that require a 'gaps and islands' analysis. There are a... 14 February 2014 21 min read
Joe Celko Nesting Levels in SQL The 'Structured' part of SQL denotes the fact that queries can be nested inside each other in such a way... 27 January 2014 13 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... 17 January 2014 16 min read
Hugo Kornelis Generating Test Data in TSQL To test SQL, you need test data. There are usually many reasons why you can't use production data. Although it... 14 January 2014 30 min read
Dev Nambi Agile Database Development Agile methodologies work well with database developments only if great care is taken to do things right. It requires good... 03 January 2014 28 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... 17 December 2013 12 min read
Joe Celko Window Functions in SQL SQL's windowing functions are surprisingly versatile, and allow us to cut out all those self-joins and explicit cursors. Joe Celko... 31 October 2013 16 min read
Dwain Camps Calculating Values within a Rolling Window in Transact SQL Before the SQL Window functions were implemented, it was tricky to calculate rolling totals or moving averages efficiently in SQL... 17 October 2013 19 min read
Joe Celko Databases and Dominoes A Dominoes game of Texas 42 inspires Joe to explore unusual uses for check constraints and views. Sometimes, the best... 09 September 2013 14 min read
Dwain Camps Gaps and Islands in SQL Server data The fun of exploring problems such as Gaps and Islands is all the greater when we have a test-harness to... 25 July 2013 16 min read
Phil Factor SQL Server ALTER TABLE syntax diagrams The words in the documentation for the ALTER TABLE syntax on MSDN are accurate with forensic precision, but the potentially-useful... 09 July 2013 8 min read
Hugo Kornelis Painless management of a logging table in SQL Server Tables that log a record of what happens in an application can get very large, easpecially if they're growing by... 11 June 2013 26 min read
Phil Factor SQL Server CREATE TABLE syntax diagrams Many of us have seen, on MSDN, the heading 'Syntax', followed by a rash of nested brackets and keywords, enough... 06 June 2013 8 min read
Joe Celko The SQL of Parts Explosions Parts explosions present a classic IT problem. How can one calculate such things as weight or cost of assemblies in... 30 May 2013 11 min read
Robert Sheldon Getting Started Testing Databases with tSQLt There are several frameworks for assisting with the testing of SQL Server databases, but tSQLt is popular because it is... 08 April 2013 22 min read