A view has no data
I have seen quite a few posts and questions lately from people that are trying to change the data in...
2011-11-08
1,936 reads
I have seen quite a few posts and questions lately from people that are trying to change the data in...
2011-11-08
1,936 reads
Doing some work with converting Multi-Statement TVFs to Inline TVFs and I'm finding that the Inline TVFs cannot use the...
2011-11-08
709 reads
If you ever wonder why column alias can be used in order by and not in where clause, it’s the...
2011-11-08
7,001 reads
Last week I was able to give a SQL Server security webinar with Quest Software and SQL Server MVP Kevin...
2011-11-08
1,171 reads
A few weeks back a client of mine asked me to write a script that could tell him the space...
2011-11-08
870 reads
Meme Monday, What #SQLFamily means to me personally.
Tom LaRock Is kicking of November with this particular meme. I’m not sure exactly...
2011-11-08
848 reads
Microsoft has released SQL Server 2010 Developer Training Kit which includes :
LabsDemosand, Presentations
This kit will greatly help you learning Developer...
2011-11-07
839 reads
There’s a large group of people that mean a lot to me. Some of them I know well, and others...
2011-11-07
760 reads
I was recently in a conversation with several people that had previously organized one or more community events. The topic evolved into a discussion of Sponsors, and eventually, fund...
2011-11-07
10 reads
I was recently in a conversation with several people that had previously organized one or more community events. The topic evolved into a discussion of Sponsors, and eventually, fund...
2011-11-07
14 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