Chicago SQL Saturday (#SQLSat211) Is This Weekend
The Chicago SQL Saturday is coming up this weekend on Saturday, April 13th. If you are waiting until the last minute...
2013-04-08
522 reads
The Chicago SQL Saturday is coming up this weekend on Saturday, April 13th. If you are waiting until the last minute...
2013-04-08
522 reads
For those that follow me on twitter (@StrateSQL), you’ll know that throughout the day I tweet out some links of...
2013-04-08
489 reads
I can’t say I’ve ever worried too much about how much power my PC uses. I care about battery life...
2013-04-08
775 reads
This is a busy travel week for me, and one of those times that stresses out everyone in the household....
2013-04-08
721 reads
Filtered index is a new feature introduced in SQL Server 2008. All the indexes that we have discussed till now...
2013-04-08
6,196 reads
Hey Friends,
It’s been a long time , I was out of touch with my blogs. But thanks to all for checking...
2013-04-08
978 reads
Restoring databases to a set drive and directory
Introduction
Often people say that necessity is the mother of invention. In this case...
2013-04-08
895 reads
sys.dm_exec_cached_plans DMV (Dynamic Management View), described by BOL as follows : http://msdn.microsoft.com/en-us/library/ms187404.aspx
Returns a row for each query plan that is cached...
2013-04-08
834 reads
According to Wiki, Procedural Justice (PJ) means:
Procedural justice is the idea of fairness in the processes that resolves disputes and...
2013-04-07
338 reads
According to Wiki, Procedural Justice (PJ) means:
Procedural justice is the idea of fairness in the processes that resolves disputes and...
2013-04-07
766 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