Converting Old Running Total Code to Window Functions
This article looks at the old style of calculating a running total and how to convert that to code that uses a window function.
2024-09-30
2,627 reads
This article looks at the old style of calculating a running total and how to convert that to code that uses a window function.
2024-09-30
2,627 reads
Platform engineering is a new area of focus for some, but it's already being seen as passé by some. Steve notes that there isn't a magic bullet for building better software. It comes about by us working together.
2024-09-30
126 reads
2024-09-30
320 reads
A customer recently wanted to know if any of their instances were too old and out of support. This was for a compliance purpose, and they had the need...
2024-09-30
34 reads
A customer recently wanted to know if any of their instances were too old and out of support. This was for a compliance purpose, and they had the need...
2024-09-30
12 reads
How can I quickly get a CU patch for a system that’s out of date? I’ll discuss that situation. You might think you get to patch every instance every...
2024-09-30 (first published: 2024-09-16)
320 reads
the McFly Effect – n. the phenomenon of observing your parents interact with people they grew up with, which reboots their personalities into youth mode, offering you a glimpse...
2024-09-27
32 reads
2024-09-27
692 reads
Azure Data Studio (ADS) is a lightweight IDE built...
2024-09-27
1,003 reads
2024-09-27
415 reads
By Steve Jones
This is timely, as I’m currently on a boat in the Adriatic taking a...
You can find the slides and SQL scripts for my session “Spice up your...
By SQLPals
How to Clear the SSMS Cache (SSMS 21 and Later) Updated...
Telp/Wa 628218200203 Gedung Sutrado, Jl. Kenari 2 No.5 Lt. 1, RT.2/RW.3, Kenari, Kec. Senen,...
Telp/Wa 628218200203 Jl. Biak No.44 AB, RT.8/RW.11, Cideng, Kecamatan Gambir, Kota Jakarta Pusat, Daerah...
Telp/Wa 628217555651 Gedung Plaza Bank Index Ground, Jl. M.H. Thamrin No.57 Floor Suite GF-21,...
We have this code that sets some status values and then queries them using the CHOOSE() function in SQL Server 2025.
CREATE TABLE Status
(
StatusID INT,
StatusDescription VARCHAR(20)
);
GO
INSERT dbo.Status
(
StatusID,
StatusDescription
)
VALUES
(0, 'Uncategorized'),
(1, 'Active'),
(2, 'Inactive'),
(3, 'Temp');
GO
SELECT CHOOSE(StatusID, 'Unknown', 'Active', 'Inactive', 'Temporary')
FROM Status;
When the SELECT runs, what is returned? See possible answers