What’s in a Name?: Inside the Wacky World of T-SQL Identifiers
(last updated: 2018-04-28)
Today we are going to take a look into an area that you probably are thinking has very...
2018-04-18 (first published: 2018-04-09)
2,946 reads
(last updated: 2018-04-28)
Today we are going to take a look into an area that you probably are thinking has very...
2018-04-18 (first published: 2018-04-09)
2,946 reads
If you are working on SQL Server optimization delicately, you may get often queries that how to find if any...
2018-04-09
977 reads
It’s been 45 days since we released dbachecks
Announcing dbachecks – Configurable PowerShell Validation For Your SQL Instances https://t.co/2dmUdKtgTQpic.twitter.com/N8W01KaKo9
— Rob Sewell (@sqldbawithbeard) February...
2018-04-18 (first published: 2018-04-08)
2,247 reads
Encryption is a good technique using which a particular data is obfuscated with a key or password. This makes the data useless until any decryption key or password is...
2018-04-07
23 reads
Encryption is a good technique using which a particular data is obfuscated with a key or password. This makes the...
2018-04-07
578 reads
How to build an abstraction layer between physical and logical layers in the database code
2018-04-07
180 reads
SQL Server comes with a default SQL agent job installed (for most installations) to help manage the collection of system health data. I would dare say this job is...
2018-04-06
83 reads
SQL Server comes with a default SQL agent job installed (for most installations) to help manage the collection of system...
2018-04-17 (first published: 2018-04-06)
4,186 reads
It’s Friday and I’m ready for the weekend as I’m sure everyone else is. This weekend I’m looking forward to...
2018-04-16 (first published: 2018-04-06)
3,424 reads
Keep a good eye on your backup and maintenance; they’re kind of important to the health and well-being of your job wait I mean...
2018-04-06
376 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...
Comments posted to this topic are about the item Using CHOOSE()
Comments posted to this topic are about the item Re-Seeding a Broken Log Shipping...
Comments posted to this topic are about the item The DBA is Dead! Long...
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