Laws You Break at Your Peril
Laws of Thermodynamics
TANSTAAFL
Gods of the Copybook Headings
All magic comes with a price
Winter Is Coming
My adult years started with a pretty...
2013-03-20
864 reads
Laws of Thermodynamics
TANSTAAFL
Gods of the Copybook Headings
All magic comes with a price
Winter Is Coming
My adult years started with a pretty...
2013-03-20
864 reads
GAAAAAAAHHHHH!!!!
I feel slightly better, but only slightly.
I started watching Star Trek: The Next Generation on Netflix just to unwind my...
2013-03-18
1,145 reads
Every day, out in the SQL Server forums, the same questions come up again and again: why is this query running slow? Why isn't my index getting used? In order to arrive at the answer you have to ask the same return question in each case: have you looked at the execution plan? Grant Fritchey provides the only dedicated and detailed book on this essential topic.
2013-03-15
51,206 reads
The greatest part of my job is that I get to travel all over the world to present different technical...
2013-03-11
1,175 reads
I jumped at the opportunity to write a chapter for this book, Pro SQL Server 2012 Practices, because of all...
2013-03-04
1,702 reads
I earned my nickname. I’m proud of it. I am the Scary DBA. I don’t really like to advertise my...
2013-02-27
1,534 reads
In just a couple of weeks I’ll be flying down to Richmond, VA to speak at SQL Saturday #187. I’ll...
2013-02-25
890 reads
Want to start a fight between a bunch of DBAs or database developers? Ask them where the comma should be...
2013-02-18 (first published: 2013-02-13)
3,562 reads
For many years, I loved being a DBA because, unlike being a developer, I could sort of hide from the...
2013-02-06
1,032 reads
I just did a series of Boogle searches and when that didn’t find anything I tried Ging. Neither listed sys.dm_db_wait_stats....
2013-02-04
1,407 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