A Little Azure Fun on Friday
You know how we’ve always heard that sp_msforeachtable and other similar undocumented functions may not be supported in future versions...
2013-05-24
731 reads
You know how we’ve always heard that sp_msforeachtable and other similar undocumented functions may not be supported in future versions...
2013-05-24
731 reads
It’s amazing how software has advanced. I look at the software I use, and I’m amazed. I still remember texting...
2013-05-31 (first published: 2013-05-24)
2,053 reads
The Windows 8 and Windows Server 2012 SP1 Virtual Machines on my laptop are connecting just fine to my physical...
2013-05-31 (first published: 2013-05-24)
4,812 reads
This code demonstrates how to do an INSERT into SQL Server from a PowerShell script using an ADO.NET command object...
2013-05-24
85,898 reads
Recently I encountered a problem of handling dates while converting a vb6 code to .net code.
Problem - cant predict what the...
2013-05-24
509 reads
Today I will talk about a book titled ” Windows PowerShell 3.0 Step by Step” by Ed Wilson;O’Reilly Media, Inc.
When I...
2013-05-23
942 reads
by Steve Bolton
I was drawn into the realm of SQL Server in a roundabout manner thanks to Visual Basic. Around...
2013-05-30 (first published: 2013-05-23)
4,198 reads
As I mentioned in the introductory post, in the Introduction to SQL Server Security session for Pragmatic Work’sTraining on the T’s, I...
2013-05-28 (first published: 2013-05-23)
2,213 reads
I am fortunate enough to have been selected to give a presentation at the PASS Summit 2013 in Charlotte, NC on October...
2013-05-23
749 reads
As I mentioned in my original post, Exploring Excel 2013 as Microsoft’s BI Client, I will be posting tips regularly...
2013-05-23
737 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 Risk Vs Reward, The never...
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...
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