Restoring Toggle Results Window as Ctrl+R in SSMS
Recent versions of SQL Server Management Studio have unmapped Control+R as the toggle for the Results window in a typical...
2014-09-03
1,875 reads
Recent versions of SQL Server Management Studio have unmapped Control+R as the toggle for the Results window in a typical...
2014-09-03
1,875 reads
I was recently called out by Tim Costello on a blog series started by Mike Walsh. http://www.interworks.com/blogs/tcostello/2014/08/27/4-things-i-wish-i-knew-sooner-bi-consultant
The series calls for...
2014-09-02
1,335 reads
Last week we were at 332, this morning at about the same time we’re at 356. Not bad for a...
2014-09-02
553 reads
My summer event hiatus is coming to a close, and we’re now back into the conference and event season! I’ve...
2014-09-02
740 reads
I wrote about a basic PIVOT query recently. It’s an interesting way to write a query and turn row data...
2014-09-02
2,063 reads
The first thing that always comes to mind when discussing performance tuning is query plans and rightly so. They are...
2014-09-02
2,602 reads
We use databases to store a lot of information. This can also include sensitive information we don’t want to give...
2014-09-02
4,358 reads
Microsoft SQL Server is a mature and broad technology platform that supports a diverse set of careers - this blog post...
2014-09-02
1,514 reads
Our company, Heraflux Technologies, celebrated its first birthday today on September 1st. A very sincere thank you goes to all...
2014-09-02
521 reads
It’s Monday time for this week’s weekly link round-up. If you want to catch these links “live” (so exciting), follow...
2014-09-01
358 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