The many uses of CROSS APPLY
Over the last few years of studying SQL I’ve noticed 4 different uses for the command CROSS APPLY.
In the first...
2013-05-23 (first published: 2013-05-20)
21,562 reads
Over the last few years of studying SQL I’ve noticed 4 different uses for the command CROSS APPLY.
In the first...
2013-05-23 (first published: 2013-05-20)
21,562 reads
Or, I guess it might be more appropriate to say that Powershell does Azure. Regardless, there are a set of...
2013-05-23 (first published: 2013-05-20)
1,942 reads
For those that follow me on twitter (@StrateSQL), you’ll know that throughout the day I tweet out some links of...
2013-05-20
631 reads
There are many ways to execute SQL’s or T-SQL’s across listed SQL Instances. Most of us might have faced and...
2013-05-20
1,869 reads
In a lot of industries there is a popular calculation called “Per Member Per Month Per 1000” calculation or the...
2013-05-24 (first published: 2013-05-20)
4,163 reads
In earlier version of SQL Server Management Studio (2005, 2008 and 2008 R2) you can show/hide results pane using keyboard...
2013-05-20
1,855 reads
With less
than two weeks to go until SQLSaturday#200 at 45
Liberty Blvd., Suite 210 Malvern, PA 19355, Malvern, PA, 19355 they're...
2013-05-20
1,787 reads
The biggest problem developers and newer DBAs have with understanding indexes is that you don’t realize when you’re using the...
2013-05-18
1,459 reads
I know it’s not schizophrenic, but that sounds better. It’s really a split personality.
I wrote recently about Windows 8 and...
2013-05-17
1,170 reads
Today is a very sad day for me. My love, my dear Windows has passed away. We were together for...
2013-05-17
1,088 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