Make sure your nonclustered indexes are enabled
I know this post might sound obvious. This is a very rare problem. But this actually happened to me, and...
2019-01-02
57 reads
I know this post might sound obvious. This is a very rare problem. But this actually happened to me, and...
2019-01-02
57 reads
SQL Monitor has grown from a basic alerting system to an amazing product over the years. From it’s early days...
2019-01-02
293 reads
Happy New Year! Every year for New Years we all make a big deal of coming up with New Years...
2019-01-02
1,077 reads
It is well known and understood that SQL Server requires a substantial amount of memory. SQL Server will also try to consume as much memory as possible from the...
2019-01-02
16 reads
It is well known and understood that SQL Server requires a substantial amount of memory. SQL Server will also try...
2019-01-02
341 reads
This post is part 3 in a series about physical join operators (be sure to check out part 1 – nested...
2019-01-10 (first published: 2019-01-02)
2,851 reads
This post is part 3 in a series about physical join operators (be sure to check out part 1 - nested loops joins, and part 2 - merge joins).
Watch...
2019-01-02
29 reads
This post is part 3 in a series about physical join operators (be sure to check out part 1 - nested loops joins, and part 2 - merge joins).
Watch...
2019-01-02
12 reads
Both SQL Server 2008 and SQL Server 2008 R2 go out of extended support with Microsoft in July 2019. That’s fast approaching and as we enter the new year...
2019-01-02
22 reads
Both SQL Server 2008 and SQL Server 2008 R2 go out of extended support with Microsoft in July 2019. That’s...
2019-01-02
191 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