T-SQL for Performance and Accuracy – Vern Rabe: A preconference essential for anyone using SQL Server
SQL Saturday Preconference: February 9th, 2018 in Redmond, WA Do you think you write T-SQL queries that perform well? Think...
2018-01-11
427 reads
SQL Saturday Preconference: February 9th, 2018 in Redmond, WA Do you think you write T-SQL queries that perform well? Think...
2018-01-11
427 reads
Another post for me that is simple and hopefully serves as an example for people trying to get blogging as...
2018-01-19 (first published: 2018-01-11)
1,136 reads
Thank you to everyone that took the time to write and contribute, I enjoyed reading about how you conquered your...
2018-01-11
589 reads
One thing that SQL Server does very well is come pre-configured in a lot of ways. These pre-configured settings would be called defaults. Having default settings is not a...
2018-01-11
19 reads
One thing that SQL Server does very well is come pre-configured in a lot of ways. These pre-configured settings would...
2018-01-11
541 reads
Currently the only way to rename objects in SQL Server is to use sp_rename. Although that may be changing in...
2018-01-11
1,575 reads
Link Below:
How to Change the File Extension for a Data File
In general, the file extensions that we use for SQL Server data files are MDF (Primary Data File), NDF...
2018-01-11
21 reads
Link Below:
How to Change the File Extension for a Data File
In general, the file extensions for our SQL Data Files...
2018-01-11
406 reads
Link Below:
Changing the Path for the Master Database
This article will show how we can move the master database to a new location.
The ALTER DATABASE command would work for moving...
2018-01-11
20 reads
Link Below:
Changing the Path for the Master Database
This article will show how we can move the master database to a...
2018-01-11
361 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