SQL Homework – July 2019 – Table Size
In general this homework series is meant to give you ideas of things to play with that most if not ... Continue reading
2019-07-01
138 reads
In general this homework series is meant to give you ideas of things to play with that most if not ... Continue reading
2019-07-01
138 reads
I’ve written a version of my permissions scripts for Azure SQL Database. It’s still in Beta but I’m confident enough ... Continue reading
2019-07-11 (first published: 2019-06-27)
402 reads
In case it’s not clear, we are talking about the Login Properties GUI in SQL Server Management Studio (SSMS). Now, ... Continue reading
2019-06-24
49 reads
In a performance tuning class I recently took with Brent Ozar (b/t) he mentioned temporary stored procedures and an interesting ... Continue reading
2019-06-19
110 reads
I recently did a post on the case expression short circuting and received a very very interesting comment from Chad ... Continue reading
2019-06-27 (first published: 2019-06-17)
882 reads
Let’s start with definitions: CASE Statement: This is basically an inline IF .. ELSE IF .. ELSE IF ….. etc ... Continue reading
2019-06-13
538 reads
This month, our host Mohammad Darab (b/t) has given us an interesting subject. Dear 20 year old self. Where we ... Continue reading
2019-06-11
26 reads
Forcing someone to change their password on a periodic basis is a pretty common thing, and any time I’ve gotten ... Continue reading
2019-06-19 (first published: 2019-06-05)
573 reads
Yep. It’s time for your monthly homework session. You’ve finished last months right? Please turn it in over there. This ... Continue reading
2019-06-03
33 reads
I’ve written very few things that I’m more proud of than my permissions scripts, sp_SrvPermissions and sp_DBPermissions. These scripts are ... Continue reading
2019-05-30
73 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