Categories
SQL Server

Smarter Database Project Deployments with SQLCMD Variables

A regular Database Project deployment is static and delivers consistent results regardless of environment. When it comes to schema, that’s usually desired, but data is a different story. Data is environment specific. You want a Database Project that works across all environments. You want smarter deployments. You need SQLCMD Variables. What are SQLCMD variables SQLCMD is a […]

Categories
SQL Server

Database Projects in SSMS Aren’t Quite There (Yet)

Last month in SSMS v22.4, we had the Database DevOps (preview) workload introduced which brings with it Database Projects. Last week I shared my favourite features for them which make deployments amazing. But if you’ve tried them out in SSMS you might have noticed that not everything is present. It’s a preview, after all. So what can we […]

Categories
SQL Server

Database Projects are Amazing for Deployments

If you’ve been using Database Projects for simply maintaining copies of your database objects – like I used to – then you’ve been missing out on the power of its deployments. Initially I was sceptical about how it could effectively perform upgrades but after seeing them land in SSMS last month I wanted to revisit them as a means […]

Categories
SQL Server

More Context for Copilot with SSMS v22.3

Last week, Database Instructions landed for GitHub Copilot as part of the SSMS v22.3 release. Database Instructions piggyback on extended properties to give Copilot specific context about database objects, which can in turn improve its responses. For me though, this is much more than a step closer to succumbing to AI. I see this as […]

Categories
SQL Server

The Halloween Problem and SQL Server

It’s not the usual time of year to think about Halloween, but listening to Erik Darling and Kendra Little recently on the Dear SQL DBA podcast they mentioned a completely new topic to me: Halloween protection. No, it doesn’t prevent horrors in your code, or shops putting out festive decorations in October. It’s actually much more interesting and thought it was worth […]

Categories
SQL

Understanding Return Types with ISNULL and COALESCE

Last week we looked at how expressions are evaluated with the ISNULL and COALESCE functions. Whilst we’re in the area it’s worth running through how data types are selected for them too. It might have implications with how you implement them. The way these functions choose which data type to return differs, so they aren’t direct swap outs for each other, […]

Categories
SQL

Understanding Expression Evaluation with ISNULL and COALESCE

When eliminating NULL values with SQL Server queries we typically reach for ISNULL or COALESCE to do the job. Generally speaking they’ll provide equivalent results, but they work in different ways. If you’re dealing with logic more complex than ISNULL(ColA, ColB) – for example using a function or subquery as part of the expression – then you might be in for a surprise. […]

Categories
SQL Server

The Cost of Convenience with the Import Data Wizard

If you need to create a copy of a table in another database, the ‘Import Data’ option may seem convenient. If you’ve used this method to copy to your dev environment and found things break, this post is for you. By letting the wizard create the destination table automatically, you might find your schema is […]

Categories
SQL

Exploring Regular Expressions in SQL Server 2025

String parsing is a regular occurrence when it comes to data engineering. Splitting strings, converting, combining – all in an effort to bring some order. Sometimes we need a more powerful tool, and that would be Regular Expressions (Regex). Regular expressions are something I have a fondness for under the right conditions, and with them being introduced […]

Categories
SQL Server

Discovering More About Join Operator Internals

In the previous post I explained Join Operators in SQL Server. Whilst compiling that I dug a little deeper and came across a few interesting points I thought were worth sharing. Let’s look at behaviour of the operators which may occur under specific conditions. Hopefully you find them as interesting as I did: Optimised nested loop […]