Automation and cleaner code/data are the key to future success
This blog post is a copy of a post I wrote for SQL Masters Consulting as part of T-SQL Tuesday....
2018-03-15
265 reads
This blog post is a copy of a post I wrote for SQL Masters Consulting as part of T-SQL Tuesday....
2018-03-15
265 reads
Thanks to everyone to attended the BRSSUG meeting tonight at our sponsor's location at the Baton Rouge Alliance Safety Council location and their awesome classroom training facility.See you next...
2018-03-15
13 reads
Thanks to everyone to attended the BRSSUG meeting tonight at our sponsor's location at the Baton Rouge Alliance Safety Council...
2018-03-14
552 reads
This post continues our look at date and time data types in SQL Server. SQL Server 2008 introduced new data...
2018-03-14
772 reads
Enable dark-theme for SSMS Purpose Guide to enable dark-theme in SQL Server Management Studio(SSMS). Reading time +/- 10 minutes References www.sqlserver.info...
2018-03-14
153 reads
Enable dark-theme for SSMS Purpose Guide to enable dark-theme in SQL Server Management Studio(SSMS). Reading time +/- 10 minutes References www.sqlserver.info...
2018-03-14
458 reads
Update: Now with Object Explorer shortcuts! One of the most common things I do within SSMS is to change connection for...
2018-03-14
510 reads
Memory is one among the resources forming the performance triangle—CPU and storage being the other two. If one is hit,...
2018-03-14
651 reads
This May 18th, Redgate is putting on a SQL Privacy Summit for people that are looking for solutions to help...
2018-03-14
1,251 reads
This command only applies to Azure SQL Database, at a high level it empties the database authentication cache for logins...
2018-03-14
755 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