Filling in Data Potholes Redux: Tally Tables vs CTEs
In A Previous Installment
Re-Ducks
… our heroine (that’s me) rediscovered CTEs, specifically in the recursive style. That was in my post...
2011-01-04
1,132 reads
In A Previous Installment
Re-Ducks
… our heroine (that’s me) rediscovered CTEs, specifically in the recursive style. That was in my post...
2011-01-04
1,132 reads
This is not the HOP you are looking for.
I’ve been thinking about the upcoming 24HOP event planned for March 15...
2010-12-27
973 reads
Data: it can break your foot.
Imagine that you are writing a script that looks at data grouped by the minute....
2010-12-23
1,158 reads
The 12 days of SQL
Brent Ozar (blog | twitter) had an idea: a group of people should blog about writing which...
2010-12-21
713 reads
This week a question on the Twitter #sqlhelp hash tag reminded me of a detail of SQL Server that I...
2010-12-16
1,147 reads
This past Saturday I presented my shiny new Introduction to SQL Server Partitioning session at SQL Saturday 61.
There were two...
2010-12-07
713 reads
Note: Updated 10/28 based on conversation in the comments, and 12/10 with Denali info.
TSQL Tuesday #11: Misconceptions in SQL Server
This...
2010-10-12
1,015 reads
Yeah, you heard me.
Do you like to read?
“But Kendra, why would we want to grant developers read permissions? And why...
2010-08-16
961 reads
This month’s T-SQL Tuesday topic is hosted by Robert Davis and the topic is “How do you learn? How do you teach?...
2010-07-13
1,357 reads
Data Collection, Puppy Style
Update: Based on Bill Ramos’ comment below and a note on Twitter (thanks!!) I have added some...
2010-06-26
1,848 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...
Telp/Wa 628218200203 Gedung Sutrado, Jl. Kenari 2 No.5 Lt. 1, RT.2/RW.3, Kenari, Kec. Senen,...
Telp/Wa 628218200203 Jl. Biak No.44 AB, RT.8/RW.11, Cideng, Kecamatan Gambir, Kota Jakarta Pusat, Daerah...
Telp/Wa 628217555651 Gedung Plaza Bank Index Ground, Jl. M.H. Thamrin No.57 Floor Suite GF-21,...
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