Total Number Of Records In each Table
Quite often in our day today activity we need to check the count of records in each table of the...
2013-04-03
737 reads
Quite often in our day today activity we need to check the count of records in each table of the...
2013-04-03
737 reads
I’ve spoken at quite a few SQL Saturday events. I won’t hit 50 this year, like Kevin Boles, but by...
2013-04-02
794 reads
I hope you were able to attend my free webinar on Introduction to Analysis Services on April 2, 2013. If...
2013-04-08 (first published: 2013-04-02)
2,230 reads
Crack a beer and melt the cheese, the Madison SQL Saturday is this weekend. Don’t wait any longer because you...
2013-04-02
494 reads
A quick list of how each of these Microsoft BI tools handles the two data sources “SQL Server” (relational-based) and...
2013-04-02
1,285 reads
GUYS! GUYS! GUYS!!! We’ve finally completed the MidnightDBA.com facelift that many of you have been begging (nagging, pining, etc.) for,...
2013-04-02
632 reads
With opening day of Major League Baseball season finally here, I thought I’d take the time to cover two of...
2013-04-02
1,298 reads
As part of our SQL Server infrastructure consolidation project, it was decided to consolidate multiple companies SQL Server 2005 / SQL...
2013-04-09 (first published: 2013-04-02)
8,526 reads
by Steve Bolton
In the last two installments of this series of amateur self-tutorials on SQL Server Data Mining (SSDM),...
2013-04-10 (first published: 2013-04-01)
3,813 reads
After working on this monthly checklist for over a year, I’ve recently discovered that there isn’t anything that we should...
2013-04-01
550 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