Blogs Louis Davidson in Blogs Just What Exactly Will Cast to a Bit Value? I am working through my OneNote folder of blog ideas, and this one, while being one of the least consequential... 02 April 2018 4 min read
Blogs Louis Davidson in Blogs Securing access to data for admin and dbo In this blog, I want to explore what you can do to block the owner of a database from doing... 19 March 2018 11 min read
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... 09 February 2018 5 min read
Kathi Kellenberger FIFO Stock Inventory in T-SQL: The Window Function Approach vs Dave Ballantyne’s Original Set-Based Solution Solving the FIFO (first-in, first-out) stock inventory problem in T-SQL with window functions - Aunt Kathi Kellenberger's approach using SUM()... 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... 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... 09 September 2015 35 min read
Dwain Camps SQL Conditional JOIN: Why It’s Slow & What to Use Instead Learn why conditional JOINs using CASE in the ON clause cause poor SQL Server performance. Compare alternatives: LEFT OUTER 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... 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... 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... 18 May 2015 27 min read
Phil Factor Documenting a SQL Server Database: Extended Properties, YAML Headers, and Publishing Strategies Comprehensive guide to documenting a SQL Server database: where to keep documentation, what standards exist (XML, JSON, YAML), how to... 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,... 26 January 2015 29 min read
Grant Fritchey SQL Server Execution Plans for Developers: Query Tuning Guide by Grant Fritchey Grant Fritchey explains why SQL Server developers need to read execution plans: identify N+1 problems from ORMs, diagnose poorly designed... 12 January 2015 31 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... 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... 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... 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... 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... 13 August 2014 141 min read
Dwain Camps Check Digits in T-SQL: UPC, Luhn, and IBAN Algorithms with Code Calculate and verify check digits in T-SQL for Universal Product Codes (UPC), credit card numbers (Luhn algorithm), and International Bank... 11 July 2014 24 min read
Learn SQL Server Jes Borland in Learn SQL Server SQL Server Indexed Views: What They Are and How to Create Them SQL Server indexed views persist query results as a physical clustered index, making complex aggregations and joins fast for repeated... 12 February 2014 24 min read