SQL SERVER connectivity error: SQL Server does not exist or access denied
Recently I was troubleshooting a connectivity issue in a development environment from an application. The application was using the connection...
2012-01-16
50,202 reads
Recently I was troubleshooting a connectivity issue in a development environment from an application. The application was using the connection...
2012-01-16
50,202 reads
My good friend Justin Hostettler-Davies (JHD) aka @JHDAVIES , the same JHD who recently scaled Kilimanjaro, is on the fund raising...
2012-01-16
809 reads
I saw an interesting post this morning care of the micro-blogging/social networking site twitter that really got me thinking about...
2012-01-15
1,471 reads
SQL Azure Data Sync
This weekend I decided to setup a SQL Azure sync group to synchronize a SQL Azure database...
2012-01-15
1,246 reads
Including Missing Values in Data Ranges Without a Lookup Table
Including Missing Data
One of the ways that I learn new things...
2012-01-14
1,730 reads
Yesterday Bill Graziano announced the appointment of two Directors (Kendal Van Dyke and James Rowland-Jones) to fill vacancies on the...
2012-01-14
950 reads
Last FM Wrapper
You know that web project we created? You can completely forget about that for now as this is...
2012-01-14
63 reads
Gee thanks Jes (blog|twitter). Just what I wanted, a little extra work on a Friday afternoon. I used to like...
2012-01-13
1,443 reads
“Bill, are you running SQL R2 on your desktop?”
This seems like a simple enough question, yet I usually cannot get...
2012-01-13
851 reads
Power corrupts.
A famous quote, and it’s one of the the most true quotes I’ve seen in my life. When someone...
2012-01-13
1,289 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