DTS vs Linked Server
We are trying to move to version 2 of our accounting data warehouse (more likely called a datamart), but it...
2007-09-25
1,607 reads
We are trying to move to version 2 of our accounting data warehouse (more likely called a datamart), but it...
2007-09-25
1,607 reads
When I first got into IT full time 10 years ago, I noticed that my mind was constantly solving programming...
2007-09-25
1,290 reads
Somehow between the sessions, networking and socializing I never found time to post anything last week. So, I'm going to...
2007-09-23
1,345 reads
This was my 5th year at PASS and every year I enjoy catching up with old friends and meeting many...
2007-09-23
1,375 reads
The SQL Server 2000 security model is not the best one of all the RDBMS platforms and requires some work to secure properly. One of the practices that is recommended is removing the builtin/administrators group from accessing the SQL Server. New author Kathi Kellenberger shows us some of the pitfalls she encountered when removing this group from her servers.
2007-08-10 (first published: 2005-01-12)
30,161 reads
I haven't posted much lately, but it has been a busy few months with many family activities. At work, I...
2007-07-09
454 reads
I was at DevTeach/SQLTeach in Montreal last week. The conference was very well run and the organizers did a great...
2007-05-19
1,319 reads
They are a basic type of query that every DBA and developer should be able to write, but aggregates are sometimes misunderstood and result in strange behaviors and results. Kathi Kellenberger brings us a tutorial on what aggregate queries are and a few hints on how to become more proficient at writing them.
2007-03-16 (first published: 2005-12-19)
37,539 reads
Yesterday's post reminded me of another interesting technique I have used to change the color of the values on a...
2007-03-11
1,337 reads
I found an interesting use for the IIF function in a Reporting Services report this week. I needed to provide...
2007-03-10
1,735 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