Calculate Length - Most Advanced UOC
This function is used to calculate the actual unit of conversion for length.
2015-02-06 (first published: 2014-12-15)
873 reads
This function is used to calculate the actual unit of conversion for length.
2015-02-06 (first published: 2014-12-15)
873 reads
2015-02-05 (first published: 2013-03-22)
4,511 reads
Useful script in cases where auditors would like to know roles for each user in each database of an instance as well as the status of associated logins.
2015-02-03 (first published: 2015-01-25)
3,004 reads
This function is used to calculate the actual unit of conversion for volume.
2015-01-30 (first published: 2014-12-16)
846 reads
Run this stored procudure to update statistics for those SQL Server databases where you have permission
2015-01-27 (first published: 2015-01-08)
1,276 reads
This script is useful to remove SQL backup files except latest one for same day from Backup Path.
2015-01-26 (first published: 2014-12-12)
1,123 reads
This function is used to calculate the actual unit of conversion for power.
2015-01-23 (first published: 2014-12-16)
877 reads
This script is useful to copying latest backup files from job Backup path during Instance/Database Migration
2015-01-21 (first published: 2014-12-15)
998 reads
This function is used to calculate the actual unit of conversion for time.
2015-01-19 (first published: 2014-12-15)
1,039 reads
This function is used to get the particular string occurences count from the given input string.
2015-01-16 (first published: 2014-12-16)
1,143 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