Quick Tips–SQL Prompt Aliases for Every Table
I love SQL Prompt, and think it’s a great productivity tool. Even before I worked at Red Gate, I love...
2014-07-24 (first published: 2014-07-17)
9,806 reads
I love SQL Prompt, and think it’s a great productivity tool. Even before I worked at Red Gate, I love...
2014-07-24 (first published: 2014-07-17)
9,806 reads
Contrary to the title (by design), Access Disdain is about not automatically hating Access (or it’s users). Clearly Access has...
2014-07-17
628 reads
You need to run the following query and it will give you the date of your SQL Server Installation. SELECT @@SERVERNAME SERVERNAME, CREATE_DATE ‘INSTALALTIONDATE’ FROM SYS.SERVER_PRINCIPALS WHERE SID =...
2014-07-17
26 reads
There
are a number of ways to collect basic information about SQL Server, its
version, edition and other top-level properties. What is...
2014-07-22 (first published: 2014-07-17)
11,347 reads
A few months ago I followed an introductory course about the data vault modeling technique for data warehouses at a...
2014-07-17
1,757 reads
You need to run the following query and it will give you the date of your SQL Server Installation.
SELECT @@SERVERNAME...
2014-07-17
1,892 reads
About two months ago, after two and a half years, I left Microsoft.
Microsoft is an amazing place to work for. It’s...
2014-07-17
485 reads
Regardless of the type of development (application or reporting) that you are performing on SQL Server. There are 5 items...
2014-07-23 (first published: 2014-07-17)
9,754 reads
About two months ago, after 2.5 years, I left Microsoft.
Microsoft is an amazing place to work for. It’s conformable, balanced,...
2014-07-17
566 reads
This is a reprint with some revisions of a series I originally published on LessThanDot. You can find the links...
2014-07-24 (first published: 2014-07-17)
11,167 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