2025-09-19
1,554 reads
2025-09-19
1,554 reads
A look at window functions in SQL and how they can be used to query data without the restrictions of a GROUP BY.
2025-09-12
5,438 reads
This article dives into a fun (and interesting!) strategy for widening fixed-width columns in SQL Server, to reduce downtime, risk, and runtime at the time when a column’s data type needs to be changed.
2025-09-12
2025-09-12
1,629 reads
2025-09-10
1,827 reads
2025-09-03
1,899 reads
Helping people solve T-SQL problems is one of my favorite hobbies. Someone messaged me the other day with a complex query that was almost complete except for one issue. He needed to perform a LEFT OUTER JOIN but had to filter based on a value from the right table. However, when he added the filter, SQL removed rows from the left table. The task was to decide where to place the SQL predicate: in the ON or WHERE clause.
2025-09-01
Learn about the TABLESAMPLE option in T-SQL and uncover some of the pitfalls of assuming this works as you think it does.
2025-08-22
2,059 reads
2025-08-20
473 reads
SQL Server users have been asking for native regular expression support for over two decades. There are third-party Common Language Runtime (CLR) modules that offer this functionality, but these can be complicated to install and simply aren’t possible in some environments. I want to split a string using a regular expression instead of a static string. Will that be possible in SQL Server 2025, without CLR?
2025-08-18
You can find the slides of my session on the €100 DWH in Azure...
By Steve Jones
This value is something that I still hear today: our best work is done...
By gbargsley
Have you ever received the dreaded error from SQL Server that the TempDB log...
Hi everyone I am writing an SP where there is logic inside the SP...
Comments posted to this topic are about the item Planning for tomorrow, today -...
We have a BI-application that connects to input tables on a SQL Server 2022...
I try to run this code on SQL Server 2022. All the objects exist in the database.
CREATE OR ALTER VIEW OrderShipping AS SELECT cl.CityNameID, cl.CityName, o.OrderID, o.Customer, o.OrderDate, o.CustomerID, o.cityId FROM dbo.CityList AS cl INNER JOIN dbo.[Order] AS o ON o.cityId = cl.CityNameID GO CREATE OR ALTER FUNCTION GetShipCityForOrder ( @OrderID INT ) RETURNS VARCHAR(50) WITH SCHEMABINDING AS BEGIN DECLARE @city VARCHAR(50); SELECT @city = os.CityName FROM dbo.OrderShipping AS os WHERE os.OrderID = @OrderID; RETURN @city; END; goWhat is the result? See possible answers