Add a login to multiple SQL Servers
This is a simple powershell script that will add a particular login to multiple SQL Server instances in a go.
2017-07-19 (first published: 2017-07-04)
1,964 reads
This is a simple powershell script that will add a particular login to multiple SQL Server instances in a go.
2017-07-19 (first published: 2017-07-04)
1,964 reads
2017-07-18 (first published: 2015-10-16)
1,775 reads
Source xml is a rendition of a cross-tab report. I show the evolution of a Spackle solution for import as a SQL resultset.
2017-06-08 (first published: 2017-06-01)
529 reads
A simple PBM policy which uses WMI to find out if the CPUs in the target are running at their maximum clock speed.
2017-06-06 (first published: 2011-01-14)
2,138 reads
2017-06-05 (first published: 2016-08-15)
974 reads
As per Microsoft documentation these types will be removed from future version
2017-06-02 (first published: 2017-05-31)
2,950 reads
This Function is used to round to Second, Minute, Hour or Day or to Truncate to Second, Minute, Hour, Day, Month or Year and return Datetime Value
2017-05-31 (first published: 2017-05-23)
4,417 reads
2017-05-25 (first published: 2017-05-15)
1,664 reads
This script provides the day of the month for the standard bank holidays for any given year. This is especially useful for computing the workday after a holiday.
2017-05-24 (first published: 2017-05-10)
544 reads
2017-05-16 (first published: 2017-05-05)
934 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