SQL Server : Part 7 : Non clustered index on non unique column
In our earlier post, we have discussed about the non clustered index, but there we were always discussing about unique...
2013-03-24
3,572 reads
In our earlier post, we have discussed about the non clustered index, but there we were always discussing about unique...
2013-03-24
3,572 reads
Reading/scanning SQL Server Logs is a required DBA work item in all my work environments. I know there are lots...
2013-03-29 (first published: 2013-03-24)
2,612 reads
SQL Server SMO is a great resource for DBAs, unfortunately, before PowerShell, it is a pretty deep learning curve to...
2013-03-27 (first published: 2013-03-23)
2,725 reads
I had a post last month, MDX #25 – Slicer or Sub-Cube?, verifying that the query context did not change with...
2013-03-22
1,258 reads
I love my MacBook Air. It’s small, light, and it works well as a traveling laptop for me. It starts...
2013-03-22
1,739 reads
It’s just coming up in just a few more weeks… this is the first SQL Saturday in Fargo. North Dakota...
2013-03-22
626 reads
Welcome to this Friday’s reblog summary post. The aim of these posts is to bring some old posts that newer...
2013-03-22
666 reads
April is going to be a fantastic month! I am slated to have quite a few speaking and training opportunities...
2013-03-22
681 reads
Occasionally in forums and on client sites I see conditional subqueries in statements. This is where the developer has decided...
2013-03-26 (first published: 2013-03-22)
3,591 reads
I’m writing this because I was thinking about a member of the local PASS chapter on the way home last...
2013-03-29 (first published: 2013-03-22)
1,205 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