2013-06-25 (first published: 2013-06-03)
1,578 reads
2013-06-25 (first published: 2013-06-03)
1,578 reads
This utility will locate a column across a subset or all databases across a server. Can be configured to run across versions, and can search tables, views or both.
2013-06-24 (first published: 2013-05-31)
1,290 reads
Script will give you the list of fragemented indexes.
(For SQL 2005-2008)
2013-06-21 (first published: 2013-05-31)
1,956 reads
Create restore script from a SQL Backup file. A must have for your DBA Tool Belt.
2013-06-18 (first published: 2013-05-30)
2,334 reads
This script will attempt to re-trust untrusted foreign keys and will report counts of successes and failures.
2013-06-17 (first published: 2013-05-30)
1,184 reads
When you are running a backup or a restore, this script gives you an estimate of completion time.
2013-06-14 (first published: 2013-05-30)
1,641 reads
2013-06-13 (first published: 2013-05-30)
3,162 reads
Function to take a number as a string and return it with commas separating thousands, millions, etc.
2013-06-07 (first published: 2009-03-31)
2,456 reads
2013-06-06 (first published: 2009-03-16)
2,666 reads
Ever wondered what got restored, who did the restore and where the backup came from that did the restore?
2013-06-04 (first published: 2012-08-23)
2,040 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