Copy Triggers from One DB to Another
A simple script that transfers triggers from one database to another.
2013-03-04 (first published: 2013-02-12)
4,073 reads
A simple script that transfers triggers from one database to another.
2013-03-04 (first published: 2013-02-12)
4,073 reads
2013-02-28 (first published: 2013-02-12)
1,173 reads
ERRORFILE and MAXERRORS option are rarely used important arguments in BULK INSERT so, I will try to highlight the use of these arguments in this script.
2013-02-27 (first published: 2013-02-14)
6,157 reads
The script works through the CMS you have set up to manage your environment and gathers various server information.
2013-02-26 (first published: 2013-02-05)
1,687 reads
List all active Jobs in SQL Server with the details of the schedule.
2013-02-25 (first published: 2013-02-07)
1,322 reads
2013-02-22 (first published: 2013-02-05)
1,818 reads
A script to get the fragmentation of indexes in a database and then rebuild or reorganise accordingly
2013-02-19 (first published: 2013-01-29)
2,140 reads
2013-02-18 (first published: 2013-01-25)
2,795 reads
Script to generate script to detach or attach user databases
2013-02-15 (first published: 2013-01-29)
6,109 reads
Script to reorganize all indexes on all tables in user databases
2013-02-14 (first published: 2013-01-31)
3,295 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