2011-04-27 (first published: 2011-04-21)
2,759 reads
2011-04-27 (first published: 2011-04-21)
2,759 reads
2011-04-26 (first published: 2011-04-20)
2,683 reads
Execute this script to get information on SQL server, databases, processes, memory, buffer, locks, etc.
2011-04-21 (first published: 2009-09-03)
5,671 reads
Monitoring space in production server is one of the top priority tasks for a DBA. This script will automate it
2011-04-19 (first published: 2009-05-28)
6,135 reads
This script will reindex (online) any index eligible to be reindexed online. Accepts a day of week parameter for full offline reindexing.
2011-04-18 (first published: 2008-10-01)
4,713 reads
Retrieve the charindex of matching string for the desired occurrence
2011-04-13 (first published: 2011-04-06)
1,517 reads
Uses sp_MsForEachDb, locates members in db_datareader with permissions other than Select and Connect.
2011-04-11 (first published: 2011-03-29)
1,103 reads
The script will be helpful to kill all the user sessions before performing the refresh of the database.
2011-04-08 (first published: 2011-03-29)
2,683 reads
converting a date from existing timezone to some different time zone covering multiple location
2011-04-05 (first published: 2011-03-24)
1,208 reads
2011-04-01 (first published: 2008-02-23)
3,841 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