Introduction to Common Table Expressions
Learn how to use common table expressions to simplify your code. Replace temp tables and correlated subqueries with this cool T-SQL feature.
2009-12-08
15,281 reads
Learn how to use common table expressions to simplify your code. Replace temp tables and correlated subqueries with this cool T-SQL feature.
2009-12-08
15,281 reads
I got home Friday evening after spending several days in Seattle at PASS 2009. This was my seventh PASS Summit...
2009-11-08
442 reads
I was asked to set up a SQL Server 2008 cluster on Windows 2008 R2 this past week. One interesting...
2009-10-31
2,134 reads
My book "Beginning T-SQL 2008" came out about two weeks ago. http://www.amazon.com/Beginning-T-SQL-2008-Kathi-Kellenberger/dp/1430224614/ref=sr_1_1?ie=UTF8&s=books&qid=1256604424&sr=8-1 It's a beginning book because I assume that the...
2009-10-26
802 reads
This past Tuesday, Brian Knight visited the St. Louis SQL Server User Group to present on SSIS. The day ended...
2009-06-14
566 reads
Hey, there are probably some other blogs here letting you know that the PASS call for speakers is open right...
2009-03-30
1,351 reads
Once again I was tagged to answer a question. This time by Chris Shaw http://chrisshaw.wordpress.com .
Here is the question: Do...
2009-03-05
580 reads
I have been tagged by Tom LaRock to write about “what was your first computer and what were some of...
2009-02-19
437 reads
Yesterday I spoke on 2008 T-SQL and Data Types at the St. Louis Day of .Net event. This was an...
2008-12-14
429 reads
I have given a talk about new data types and T-SQL features to three local groups. I am presenting it...
2008-11-28
2,217 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 Jl. Batu Ceper No.18 A-B, RT.1/RW.2, Kb. Klp., Kecamatan Gambir, Kota Jakarta...
Telp/Wa 628218200233 Komplek Apartemen Grand Kartini, Ruko. 18, Jl. Kartini Raya No.57, RT.3/RW.2, Kartini,...
Telp/Wa 628217555651 Wisma 46 Lantai Dasar, Jln. Jend. Sudirman Kav. 1, RT.5/RW.3, Senayan, Kec....
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