The Moto Q and Being Proactive
I am a big fan of automating whatever I can and being proactive. The more proactive you can be, the...
2006-12-14
1,523 reads
I am a big fan of automating whatever I can and being proactive. The more proactive you can be, the...
2006-12-14
1,523 reads
My general recommendation for SQL Server service accounts and accounts that have sysadmin fixed server role membership is to default...
2006-12-11
1,923 reads
A group of us met on Thursday, December 7th, 2006, and voted to approve the bylaws and a motion to...
2006-12-11
1,461 reads
Jason Haley used to post his Interesting Finds about every day, if not multiple times a day. The interesting finds...
2006-12-09
1,380 reads
If you're like me and rely a lot on the resource kit tools, you may have found that it's relatively...
2006-12-09
1,885 reads
Several SysInternals Tools have been updated. One of the big updates was to the PSTools Suite - now you can pass...
2006-12-09
1,439 reads
Welcome to the 22nd edition of Log Buffer, a
weekly compendium of postings and news from database-related blogs across the...
2006-12-08
1,604 reads
I can think of three ways to insert just the missing rows from one table or query into another table. ...
2006-12-06
3,087 reads
"The Productivity Pro" Laura Stack posted in her blog today about jobs where long hours are the norm:
'Extreme' jobs...
2006-12-05
1,491 reads
For those considering the Microsoft Certified Architect program, some guidance on what to submit as documentation has been posted to...
2006-12-05
1,468 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