Viewing errors with extended events
A little while back I came across this post: Identifying failed queries with extended events. It has a script to ... Continue reading
2022-10-10 (first published: 2022-09-27)
373 reads
A little while back I came across this post: Identifying failed queries with extended events. It has a script to ... Continue reading
2022-10-10 (first published: 2022-09-27)
373 reads
Recently I talked about the difference between implicit and explicit datatype conversions. In it I ran this code: With the ... Continue reading
2022-09-20
32 reads
I know this is way off my usual content but the other day someone was mentioning how easy it is ... Continue reading
2022-09-15
46 reads
It’s not all that unusual, or unreasonable to put a counter in a name. For example let’s say you need ... Continue reading
2022-10-03 (first published: 2022-09-13)
585 reads
It’s now been about two and a half months since I was given notice and decided to blog about my ... Continue reading
2022-09-28 (first published: 2022-09-08)
231 reads
One of my co-workers came to me the other day and told me that they found their network id as ... Continue reading
2022-09-21 (first published: 2022-09-06)
355 reads
I had every intention of doing Replication Part 2 this month but had a thought I liked better. I will ... Continue reading
2022-09-14 (first published: 2022-09-01)
341 reads
Any time I’ve learned about the optimizer there is always one important thing that’s brought up. The optimizer is not ... Continue reading
2022-08-30
49 reads
Did you know that 1/2=0? If you didn’t you could be in for some interesting surprises. 1/2 returns 0 because ... Continue reading
2022-08-25
51 reads
I was asked a rather interesting question during an interview recently. It went something like this: Your resume says you’ve ... Continue reading
2022-09-05 (first published: 2022-08-23)
255 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