Why I’m Considering a Surface and Windows Phone 8
Anyone who knows me will see the title of this post and tell you I’m about to trash the Surface,...
2013-03-22
681 reads
Anyone who knows me will see the title of this post and tell you I’m about to trash the Surface,...
2013-03-22
681 reads
This is a short series on some customizations in SSMS to make it visually more appealing.
As a presenter, I’ve learned...
2013-03-21
1,741 reads
In our earlier post, we have discussed about the structure and storage of clustered index. In this post we will discuss...
2013-03-21
2,075 reads
Here comes CU 3 (Build 11.0.3349.0.) for SQLServer 2012 SP1. You can download the same from
http://support.microsoft.com/kb/2812412
Similar to CU2 there...
2013-03-21
1,440 reads
Hello Dear Reader! I've got some very exciting news! Pragmatic Works is holding a Two Day Performance Tuning Workshop in...
2013-03-21
1,213 reads
After this month’s Index Analysis update, I was contacted by a reader about the index analysis script. Reader Dick Baker let...
2013-03-21
747 reads
After setting up a new SQL Server instance for development I found the following permissions were needed extra permissions were...
2013-03-21
58 reads
The 3rdcumulative update release for SQL Server 2012 Service Pack 1 is now available. Cumulative Update 3 contains all the...
2013-03-21
932 reads
Here's a bug you might find if attempting to schemabind an object that uses the new TRY_CONVERT function.
To reproduce, run...
2013-03-21
1,035 reads
At some point I think that I am becoming a Microsoft Office specialist as opposed to a BI Architect. All...
2013-03-20
1,062 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