T-SQL Tuesday #36 - SQL Community (Guest Post)
This blog post is part of T-SQL Tuesday, a monthly SQL blog party with a rotating host and common topic....
2012-11-06
641 reads
This blog post is part of T-SQL Tuesday, a monthly SQL blog party with a rotating host and common topic....
2012-11-06
641 reads
I'm a candidate in the 2012 PASS Board of Directors elections and believe that an important part of what makes...
2012-10-11
1,047 reads
I'm a candidate in the 2012 PASS Board of Directors elections and believe that an important part of what makes...
2012-10-11
643 reads
I'm a candidate in the 2012 PASS Board of Directors elections and believe that an important part of what makes...
2012-10-11
672 reads
I'm a candidate in the 2012 PASS Board of Directors elections and believe that an important part of what makes...
2012-10-05
1,073 reads
It's time once again to vote for the 3 candidates we feel will best represent the SQL Server community with...
2012-10-03
1,205 reads
Split-Path is a cmdlet built into Windows PowerShell that returns a specific part of a path, e.g. a parent directory...
2012-09-05
2,784 reads
When I ran for the PASS Board of Directors last year I committed to providing a monthly update on PASS...
2012-08-07
967 reads
During the January board meeting we were told that attendance at the 2011 Summit exceeded expectations and as a result...
2012-08-07
632 reads
Writing - be it a technical language like T-SQL, C#, PowerShell, etc. or blogging - is like exercise. When you do it...
2012-08-06
1,535 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