Pagination in SQL Server
It amazes me how much easier certain tasks have gotten in SQL Server. I was watching the Nov 2014 SQL...
2015-01-22 (first published: 2015-01-15)
8,973 reads
It amazes me how much easier certain tasks have gotten in SQL Server. I was watching the Nov 2014 SQL...
2015-01-22 (first published: 2015-01-15)
8,973 reads
I don’t think anyone’s ever been happy to get a support call at 11pm on a Saturday night. However this...
2015-01-15 (first published: 2015-01-13)
6,308 reads
Over the years I’ve done a number of posts on various aspects of security. In fact the first thing I...
2015-01-12
537 reads
First this type of error is because a subquery returned more than one row when it wasn’t allowed to. In...
2015-01-07
1,286 reads
Every month SQL Judo (Russ Thomas) (b/t) challenges us to do his Monthly DBA Challenge. I’ve decided it would be...
2015-01-08 (first published: 2015-01-05)
6,258 reads
The WordPress.com stats helper monkeys prepared a 2014 annual report for this blog.
Here’s an excerpt:
The Louvre Museum has 8.5 million...
2014-12-30
927 reads
I work for a large organization that over the last few years has been doing a LOT of reorgs. And...
2014-12-31 (first published: 2014-12-29)
5,888 reads
So I’ve written my second article for SQL Shack. This time instead of an overview of auditing options in sql...
2014-12-29
1,226 reads
The log file is one of those parts of SQL Server I find fascinating. For instance it is composed of...
2014-12-23 (first published: 2014-12-17)
5,847 reads
‘Twas 4:45 Friday, and all through the office
not a creature was stirring, not even the bosses.
The code was checked in,...
2014-12-25 (first published: 2014-12-16)
5,357 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