Learning a New Development Platform
This past week at work we have been having some in-depth training. The interesting thing is it hasn't been SQL...
2009-06-18
1,341 reads
This past week at work we have been having some in-depth training. The interesting thing is it hasn't been SQL...
2009-06-18
1,341 reads
I recently posted a poll on SQLServerCentral.com asking what sites people tended to frequent. So far, there haven't been a whole lot of votes, but those who have, have been unanimous in using SQLServerCentral.com and have indicated that there are...
2009-06-17
1,211 reads
I recently posted a poll on SQLServerCentral.com asking what sites people tended to frequent. So far, there haven't been a...
2009-06-07
1,617 reads
A few weeks ago I mentioned my blog that I would have two articles published on sswug.org. Well, they have...
2009-06-04
1,579 reads
While perusing some of the threads on SQLServerCentral.com one of the questions that hit me was regarding the use of scalar functions in queries. In this particular case, in the column list of a SELECT statement. Did it make sense to encapsulate a routine...
2009-05-12
1,958 reads
While perusing some of the threads on SQLServerCentral.com one of the questions that hit me was regarding the use of...
2009-05-07
3,365 reads
I have been a bit lax these past few days, but I have been having a bit of a writers block not knowing what to write about. Well, I realized this evening there is something worth writing about, and it is happening right now on SQLServerCentral.com. An...
2009-05-07
1,496 reads
I have written two new articles and they are going to be published, not on SSC but on SSWUG. I...
2009-05-02
1,289 reads
I have been a bit lax these past few days, but I have been having a bit of a writers...
2009-04-27
1,459 reads
I know I discussed this in an early post, but it seems to have reared its ugly head again. This...
2009-04-17
1,594 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