Question of the Week - 11/1/2014
Question:- Suppose there are two tables A and B and we need to write 3 SQL queries which returns the record...
2014-01-11
789 reads
Question:- Suppose there are two tables A and B and we need to write 3 SQL queries which returns the record...
2014-01-11
789 reads
Question :- In which database temporary tables are created in SQL Server?
1) User database (where temporary table are defined)
2) Master...
2014-01-11
1,684 reads
I was asked by Idera to take a look at the things that could cost a DBA their job. This...
2014-01-10
1,069 reads
Regular expressions are searches on steroids, the wildcats of the wildcard world*. Even if you never ever write CLR, regex...
2014-01-10
1,255 reads
This post talks about step by step approach to capture the disk space using T-SQL. This is a request from...
2014-01-10
769 reads
We are often told that we need to practice our restores. And it might not be obvious, but the reason...
2014-01-10
437 reads
Photo credit – JStove
Old posts are like unicorns. You might see them just once, but it’d sure be nice to have...
2014-01-10
369 reads
I saw a discussion on Twitter yesterday where Kendal Van Dyke referenced the SQLSaturday wiki as a resource, I thought...
2014-01-10
392 reads
I use a password manager and it currently has more than 150 accounts in it, ranging from my checking account...
2014-01-17 (first published: 2014-01-10)
1,818 reads
Initiating subscription is a tedious task in SQL Server Reporting Services. Each subscription in Reporting Services is setup as a...
2014-01-10
698 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 Risk Vs Reward, The never...
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...
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