2017-01-31 (first published: 2017-01-30)
823 reads
2017-01-31 (first published: 2017-01-30)
823 reads
2017-01-30 (first published: 2017-01-26)
19,805 reads
TEMPDB doesn't have to be a black box. Know what objects and processes are causing it to bloat in size.
2017-01-30 (first published: 2016-12-29)
2,264 reads
This script will help you to find out whether a particular id (SQL or Windows ID) is present in the SQL Server
2017-01-26 (first published: 2017-01-24)
664 reads
Decryption Timer to let you know when the removal of encryption for a TDE encrypted database has completed to perform a backup of the data after masking.
2017-01-24 (first published: 2017-01-18)
484 reads
A script to be used as part of development deployments where new databases are required, so as to provide standardisation.
2017-01-23 (first published: 2017-01-18)
506 reads
Use this script to backup databases based on their role in an availability group
2017-01-12 (first published: 2017-01-07)
703 reads
This script will perfrom following tasks :
1. BackUp DB
2. Restore DB from BackUp File
3. Restore DB from DB
4. Create a new DB from Existing Db
It takes care of all the possible failures during these operations, while done manually.
2017-01-11 (first published: 2017-01-09)
1,796 reads
2017-01-10 (first published: 2017-01-05)
969 reads
Finding characters/string before and after some character or pattern
2017-01-06 (first published: 2015-11-09)
266,803 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