Public Role and Security
A good rule of thumb with the public role is to leave it be. Do not add permissions to this role. Add permissions on a per database and per...
2011-12-20
22 reads
A good rule of thumb with the public role is to leave it be. Do not add permissions to this role. Add permissions on a per database and per...
2011-12-20
22 reads
Having flown a fair amount lately, I was thinking about the various levels of security within an airport. Part of...
2011-12-29 (first published: 2011-12-20)
3,544 reads
ISOWEEK 52 Weeks in the Year
Stardate 12:20:2011 Week 51 SSC.Com Web Blog, Planet Earth. With only approximately two weeks left...
2011-12-28 (first published: 2011-12-20)
15,251 reads
With SQL Server 2012 comes a new set of conversion functions, that will certainly help doing type casts and conversions...
2011-12-20
1,207 reads
Display folders are an often used tool in Analysis Services to help end users navigate through a cube or dimension...
2011-12-27 (first published: 2011-12-20)
6,449 reads
The basis for all the encryption in SQL Server is the Service Master Key, which is the top of the...
2011-12-19
4,560 reads
Suspect database generally caused by internal IO issue, and the best way to resolve it to ask hardware person to...
2011-12-19
495 reads
Since the final RTM release of SQL Server is getting ever closer, I thought it was a good time to...
2011-12-27 (first published: 2011-12-19)
3,655 reads
Junk dimensions are dimensions that contain miscellaneous data such as flags and indicators. When designing a data warehouse, you might...
2011-12-19
1,389 reads
If you fill the jar with pebbles first, you'll never have room for the big rocks.
I’m sure you’ve heard the...
2011-12-19
1,220 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