External Article

SQLChess - A tutorial on thinking in sets

Chess makes a fantastic game for programming examples. You will find hundreds of examples on the internet. Some dedicated to OO patterns, others to algorithms and so forth. Unfortunately, most of these examples do not use a database or if they do, treat the database as nothing more than a storage repository. In this series of articles we will use SQL Server and T-SQL to implement the game of chess with an emphasis on thinking in sets.

External Article

Returning a week number for any given date and starting fiscal month

Sql Server comes with a host of built in functions such as ISNULL, CONVERT and CAST. Now if that wasn't enough rope to hang ourselves with, as of Sql Server 2000 we gained the ability to create our own user defined functions. In this article I will be looking at the three main date functions DATEADD, DATEPART and DATEDIFF (there is a fourth called DATENAME but I want to get to the end of this article before you fall asleep so I decided to leave it for another date and time! And no it doesn't foretell the name of your future blind date so it's not as interesting as it sounds anyway) Then I will be combining all three in a user defined function of our own by which time our necks will be well and truly stretched

Blogs

Advice I Like: Knots

By

Learn how to tie a bowline knot. Practice in the dark. With one hand....

Shifting Mindsets: Why FinOps is Essential for Cloud Efficiency

By

As a DevOps practitioner, I’ve always focused on performance, scalability, and automation. But as...

March 2026 SQL Server Security Updates

By

On Patch Tuesday, in addition to OS and Office security patches, Microsoft also released...

Read the latest Blogs

Forums

Multiple Deployment Processes

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Multiple Deployment Processes

How to Use sqlpackage to Detect Schema Drift Between Azure SQL Databases

By Kunal Rathi

Comments posted to this topic are about the item How to Use sqlpackage to...

Upgrading Admin Queries

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Upgrading Admin Queries

Visit the forum

Question of the Day

Upgrading Admin Queries

I have a query from a former DBA that we run on SQL Server 2025 to check on database metadata. This query references sys.sysaltfiles. I want to refactor this code to be more modern. Which DMV should I reference instead?  

See possible answers