The Project Graveyard
This post is a response to this month's T-SQL Tuesday #107 prompt by Jeff Mlakar. T-SQL Tuesday is a way for the SQL Server community to share ideas about...
2018-10-09
9 reads
This post is a response to this month's T-SQL Tuesday #107 prompt by Jeff Mlakar. T-SQL Tuesday is a way for the SQL Server community to share ideas about...
2018-10-09
9 reads
# Assuming you have list of servers in servers.txt, each server name in its own line
$ComputerNames = get-content servers.txt
# Method 1 - Using the Get-Counter cmdlet#...
2018-10-08
1,045 reads
First, many thanks to the SQL Saturday and MNPass team for putting on another great event and letting me participate.
I...
2018-10-08
308 reads
In this article, we’ll walk-through the SQL update statement to modify one or more existing rows in the table. After reading...
2018-10-08
312 reads
“We don’t want to know that it’s broken, just that it’s working.” “We want our database to always be available.”...
2018-10-08
438 reads
The last Database Fundamentals post introduced the SELECT and FROM commands. We’re going to start using JOIN operations shortly, but...
2018-10-22 (first published: 2018-10-08)
2,971 reads
# Assuming you have list of servers in servers.txt, each sever name in its own line
$ComputerNames=get-content servers.txt
Get-WmiObject -Query "select * from win32_service where...
2018-10-08
219 reads
I was lucky to get an opportunity to present a session to some college students at Seminole State College in Florida last week. I was in town for SQL...
2018-10-08
26 reads
Do you think you need to use commercial tools like SQL Diagnostic Manager, SQL Sentry, Spotlight etc.. ? Or do you think...
2018-10-07
480 reads
Continue to my interest on MongoDB Blog lastly on MongoDB 4.02, I attended MongoDB CHICOGO .local Sep 12 and learned so...
2018-10-06
224 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