2012-06-06
3,118 reads
2012-06-06
3,118 reads
Often someone will try to perform a delete on a large number of records and run into a number of problems. Slow performance, log growth, and more. Lynn Pettis shows us how to better handle this situation in SQL Server 2000 and SQL Server 2005
2011-02-18 (first published: 2009-09-15)
54,625 reads
If any of you follow me on SQLServerCentral.com, then you know I recently started a new job. Well, after two...
2010-08-26
1,711 reads
On June 1, 2010, Steve Gray had an article, Sins of SQL: The Time Table, published on sqlservercentral.com. I’m not...
2010-06-03
2,616 reads
2010-04-30
3,455 reads
This is not a technical post, it’s personal, but I need to express my fears. It isn’t about our economy,...
2010-04-01
1,573 reads
Building a tally table is a common T-SQL problem that many new developers struggle with. Lynn Pettis brings us an article that shows how to use CTEs to accomplish this.
2009-09-22
11,288 reads
Okay, my second article which was originally published on sswug.org, is now available on SQLServerCentral.com. This article compares two methods...
2009-09-21
1,284 reads
Well, the first of two articles I originally had published on sswug.org will be published on ssc tomorrow. I'm looking...
2009-09-14
1,518 reads
I realize I have been relatively quiet for a while, but summer is actually a fairly busy time for us...
2009-08-22
1,235 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