SQL Table variable and temporary table
Table variables and Temporary tables are used interchangeably – but they were designed for different purposes.
Temporary tables were designed for storage...
2011-12-01
1,762 reads
Table variables and Temporary tables are used interchangeably – but they were designed for different purposes.
Temporary tables were designed for storage...
2011-12-01
1,762 reads
When configuring a subscription to a publication in SQL Server, on initialization it is common to encounter the error:
The process...
2011-11-30
43,338 reads
The Holidays are upon us. It is time to take a break from the hustle and bustle and come out to participate in the local User Group for SQL...
2011-11-30
13 reads
The Holidays are upon us. It is time to take a break from the hustle and bustle and come out...
2011-11-30
1,634 reads
Here is the list of suckers, uh, I mean, candidates, that actually want to subject themselves to the board. Look...
2011-11-30
2,330 reads
Introduction
Many times while developing our applications we feel the need of pagination, where our User Interface (UI) has to list...
2011-11-30
9,806 reads
Behind the scenes in SSIS, the data flow engine uses a buffer-oriented architecture to efficiently load and manipulate datasets in...
2011-11-30
16,641 reads
My main phone line at the house has been on the fritz for about 3-4 weeks. Yes, we still have...
2011-11-30
2,435 reads
While you wait for my awesome upcoming blog on data exception notification with SSRS, let’s pursue a whim of mine.
I...
2011-11-30
1,678 reads
Part 1 of Question 8—The question.Part 2 of Question 8—The follow up to the question.This is a continuation of my...
2011-11-30
1,855 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