Protected: SQLSaturday #86 in Tampa–Tomorrow!
This post is password protected. To view it please enter your password below:
Password:
2011-11-04
393 reads
This post is password protected. To view it please enter your password below:
Password:
2011-11-04
393 reads
Coming to the Capitol, tomorrow Saturday, November 5, 2011 is SQLSaturday#96 in Washington, D.C.! This great event down in DC,...
2011-11-04
887 reads
Well this was quite the little surprise this morning. Microsoft announced a new edition to the SQL Server lineup for...
2011-11-03
2,725 reads
Full disclosure: There might be a better way to do this. I am not aware of it.
Problems:
Maintaining multiple DB environments...
2011-11-03
1,477 reads
Some time ago, I had the opportunity to work on a problem involving the color wheel. The requirements for that problem lent themselves to a solution involving bitwise operations...
2011-11-03
16 reads
Some time ago, I had the opportunity to work on a problem involving the color wheel. The requirements for that...
2011-11-03
1,272 reads
Well, I finally got the feedback from my SQL Audit presentation last month, and I’m very pleased. Ok, more than...
2011-11-03
790 reads
(I’m ‘standing in for Brad, who is busy ..er.. somewhere, and I found this unpublished piece by Brad and I....
2011-11-03
1,429 reads
If you have ever closed a query window by accident only to wish you could get back your work an...
2011-11-03
4,005 reads
Unary Operator and Aggregating over time
In my last post I discussed how to arrange all of the GLs into a...
2011-11-03
3,287 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