2013-07-22 (first published: 2009-04-30)
3,910 reads
2013-07-22 (first published: 2009-04-30)
3,910 reads
2013-07-19 (first published: 2013-07-01)
671 reads
Outputs an easily readable result of the database and server roles for database principals.
2013-07-18 (first published: 2013-06-14)
1,085 reads
Records snapshots of space usage & buffer cache usage stats by partition, index, table, schema, filegroup, & database. Stats incl Reserved, Used, Data, buffer cache for row, lob, & overflow.
2013-07-17 (first published: 2009-05-30)
2,824 reads
Split a string with separator without looping. Can be efficiently used with joins if necessary.
2013-07-12 (first published: 2013-06-15)
2,470 reads
2013-07-10 (first published: 2013-06-19)
1,679 reads
This is a stored procedure to add a columns to multiple tables, if column doesn't exist
2013-07-09 (first published: 2008-05-27)
993 reads
This will generate a script that drops and recreates existing db mail accounts and change the smpt server.
2013-07-08 (first published: 2013-06-19)
845 reads
2013-07-03 (first published: 2013-06-07)
927 reads
I wrote this script to help determine which data files are taking up space on an instance.
2013-07-02 (first published: 2013-06-05)
1,628 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