Count_Big() function
Learned new function for count while going through the channel 9 video for salva. where for a very big table...
2018-01-22
616 reads
Learned new function for count while going through the channel 9 video for salva. where for a very big table...
2018-01-22
616 reads
The next edition of the SQL in the City broadcast is coming Feb 28, and I’m planning travel now to...
2018-01-30 (first published: 2018-01-22)
1,311 reads
I recently had the opportunity to be a Dungeon Master (DM) at a gaming convention. It was my first time....
2018-02-02 (first published: 2018-01-22)
1,580 reads
Don’t you hate it how certain words (well, acronyms in this case) get reused to mean multiple things? dbo seems...
2018-01-29 (first published: 2018-01-22)
1,995 reads
Most of the time users need to import their data into SQL Server for its proper management. Select from the...
2018-01-22
823 reads
After a considerable amount of “umming and ahhing” last year I decided to start presenting full hour long sessions. Well,...
2018-01-22
257 reads
(Be sure to checkout the FREE SQLpassion Performance Tuning Training Plan - you get a weekly email packed with all the...
2018-01-22
1,157 reads
System-versioned temporal tables is new database feature of SQL Server 2016. Another improved version of table level auditing with some...
2018-01-22
794 reads
The Object Explorer Details windows (from the View menu, or the keyboard shortcut F7) displays detail information about the objects...
2018-01-21
128 reads
The Object Explorer Details windows (from the View menu, or the keyboard shortcut F7) displays detail information about the objects...
2018-01-21
382 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