Extreme situations require extreme commands
The title is adapted from a child-hood movie of mine and is my daily (database-related) WTF moment and it is...
2017-03-14
386 reads
The title is adapted from a child-hood movie of mine and is my daily (database-related) WTF moment and it is...
2017-03-14
386 reads
This idea basically started from Andy Bek’s TSQL Tuesday last year #84 growing new speakers (https://sqlbek.wordpress.com/2016/10/25/t-sql-tuesday-84-growing-new-speakers/ – thanks Andy) and I have...
2017-03-10
394 reads
If you ever need to move a copy of a SQL database in Azure across servers then here is a...
2017-03-07
358 reads
I decided to accept Grant’s (TheScaryDBA) challenge found here- http://www.scarydba.com/2017/03/02/random-blog-post-challenge/ where we have to write a technical blog post that incorporates a certain...
2017-03-03
341 reads
A nice little error log feature that I noticed in SQL Server 2016 regarding tempdb. Tempdb, a system database in...
2017-03-02
419 reads
For this blog post I want to discuss the meaning behind SQL Server: Memory Manager\Target Server Memory (KB) and SQL...
2017-03-01
455 reads
SQL Server Management Studio (SSMS) release candidate 17.0 RC2 works side-by-side with generally available releases (16.x), but it is not...
2017-02-22
572 reads
Since installing SQL Server vNext CTP 1.3 I found out that there is a new way to return statistics histogram...
2017-02-21
382 reads
I had a need to setup transactional replication from my SQL Server to SQL Database (Azure) where I only needed...
2017-02-20
395 reads
Working with a couple of databases that needed TDE I noticed when I enabled one of them that it was...
2017-02-16
379 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