Becoming a Microsoft MVP
I was awarded the Microsoft MVP (data platform) award on Saturday.
On the four days a year (one per quarter) when...
2016-10-03
647 reads
I was awarded the Microsoft MVP (data platform) award on Saturday.
On the four days a year (one per quarter) when...
2016-10-03
647 reads
It’s funny how easy it is to find information you aren’t looking for. A few weeks back Stephen Bennett (b)...
2016-10-10 (first published: 2016-09-27)
2,055 reads
As I work on my speaking skills one of my tasks is improve my PowerPoint presentations. To that end I’ve...
2016-09-26
611 reads
A while back I wrote a post on everything I knew about identity columns. In it I mentioned the following:
Negative...
2016-10-03 (first published: 2016-09-21)
2,075 reads
For many years it’s been a best practice to never put an ORDER BY in a view. The idea is...
2016-09-26 (first published: 2016-09-19)
3,911 reads
I blame Aaron Bertrand (b/t) and Kevin Kline (b/t). Aaron who posted a great #BackToBasics blog about naming stored procedures...
2016-09-15
1,313 reads
So to start, what’s a BACPAC?
Per the Azure documentation
When you need to create an archive of an Azure SQL database,...
2016-09-13
1,256 reads
This is nothing new but it’s still a fun idea.
The problem:
The vendor app we just purchased (and are told we...
2016-09-08
493 reads
I recently spoke at the OKC SQL Saturday. I had an wonderful time and the organizers, volunteers and other speakers...
2016-09-06
396 reads
Monday Bob Ward (b/t) announced on twitter that the new Data Migration Assistant had been released.
First things first the DMA...
2016-08-31
980 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