Categories
SQL

A Distinct-ly Different Approach to NULL Comparisons

Comparisons involving NULL-able values and columns are an early learning experience. I recently stumbled upon a relatively new way to handle these which I thought would be interesting T-SQL to share. Let’s start with an example, retrieving paid invoices for a particular date: If we pass NULL in to retrieve unpaid invoices we’d change the […]

Categories
SQL

Cleaning Up Window Functions in SQL Server 2022

Window functions allow us to perform a function across a set of rows in a result set, rather than how we might typically group them. In SQL Server 2022 we have a new clause available for our queries which can help tidy up how these are defined. We’ll use the sample table from the introduction to […]

Categories
T-SQL Tuesday

T-SQL Tuesday #154 – SQL Server 2022

This month’s invitation from Glenn is to write about what we’ve been doing with SQL Server 2022 as we’ve now had a release candidate unleashed upon the world. Personally I haven’t had the time to adventure through the new features or put any stress onto the version as of yet – the exception being testing […]