Generate INSERTs the new 26ai way
Six years ago(!) I did an Office Hours session where I demonstrated a little routine that would let you generate more efficient INSERTs by converting a standard INSERT-VALUES into...
2026-03-02
55 reads
Six years ago(!) I did an Office Hours session where I demonstrated a little routine that would let you generate more efficient INSERTs by converting a standard INSERT-VALUES into...
2026-03-02
55 reads
One of the super cool features in 26ai is the ability to extend the VALUES clause in your INSERT statements to allow multiple rows per execution. If you’re unfamiliar...
2026-02-27
64 reads
Addenda Feb 20: I had one colleague point out a mistake, then another colleague point out something else, then I thought about it a little and found other problems…sigh. ...
2026-02-19
46 reads
It seems an odd thing that so many facilities on the cloud environment take advantage of the concept of stored database credentials when it comes to authenticating/authorising access to...
2026-01-29
59 reads
I was working on two publisher contracts at the same time. I highly recommend never doing that. One is done, though, and it’s officially published as of September 2022....
2022-10-27
88 reads
I believe that language matters, and that it is worth our effort to move away from language associated with slavery and racism whenever possible. Azure DevOps doesn’t technically allow...
2020-06-26
576 reads
I used to make fun of YAML because I was scared of it. I still make fun of YAML, but I’m not scared of it anymore now that Rob...
2020-06-25
209 reads
Thanks to the support of Redgate, I’ve launched a new course which teaches you the basics of TSQL. The course is totally free, no logins required — we don’t...
2020-05-11
142 reads
I have an idea! Let’s have a “Worst Code Contest.” Why do this? Bad code is really fun — at least, when you write it on purpose. And other...
2020-04-24
70 reads
People have been writing about how evil scalar functions are in SQL Server for ten years. But people still use scalar functions in their code all the time. And...
2020-03-24
78 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