I already have a solution for this, but it's not elegant. I'm curious if other people have "cleaner" solutions. My goal is less to make this specific problem better, but more to find a nicer way to ...
A common SQL habit is to use SELECT * on a query, because it’s tedious to list all the columns you need. Plus, sometimes those columns may change over time, so why not just do things the easy way? But ...
An update to the cardinality estimator feature in SQL Server 2022 will be one of the biggest changes to the database engine since its inception. Database engines like SQL Server are incredibly complex ...