T-SQL Tuesday #80 – SQL Birthday Present
It’s time for another round of the global blog party we call T-SQL Tuesday. This is T-SQL Tuesday #80 and...
2016-07-12
778 reads
It’s time for another round of the global blog party we call T-SQL Tuesday. This is T-SQL Tuesday #80 and...
2016-07-12
778 reads
On one of my SQL Server instances, I see a lot of these infinite recompile messages in the SQL log....
2016-07-01
2,293 reads
Recently, I needed a query to identify tables that developers had create as point-in-time backups of tables that were never...
2016-06-23 (first published: 2016-06-16)
3,525 reads
Recently, I needed a query to identify tables that developers had create as point-in-time backups of tables that were never...
2016-06-17
792 reads
We have an internal monitoring query that checks for system threads that are blocked. Recently, we received an alert email...
2016-06-15 (first published: 2016-06-06)
2,132 reads
That’s right, I did it. I was deleting unused LUNs and the focus somehow jumped from the LUNs for the...
2016-06-08 (first published: 2016-06-01)
2,710 reads
I want to once again thank everyone who attended my 24 Hours of PASS session last week. I especially appreciate...
2016-06-02
800 reads
Recently, I wrote a maintenance script to check every table in every database on our servers at work nightly and...
2016-05-31
1,188 reads
I was honored to be selected to join many other great speakers in presenting for the recent 24 Hours of...
2016-05-27
996 reads
I know there has been a lot of drama in the community recently, much of it centered around what people...
2016-05-27
1,106 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