Select the last error in the job selected
The job will send an HTML email with the latest error at specific job.
2012-03-15 (first published: 2012-03-05)
937 reads
The job will send an HTML email with the latest error at specific job.
2012-03-15 (first published: 2012-03-05)
937 reads
Stored procedure to update SSRS Subscription owners to avoid email errors.
2012-03-13 (first published: 2012-02-28)
1,485 reads
Script which uses SQL Server DMOs to gather top CPU taxing queries which can benifit most from tuning.
2012-03-10
2,901 reads
Generate a "INSERT INTO...SELECT FROM" script for a table with an identity column.
2012-03-09 (first published: 2008-01-07)
4,261 reads
You can use this script to check if any procs will break under compatibility level 90.
2012-03-08 (first published: 2008-01-29)
4,391 reads
Procedure changes all databases' recovery mode to simple and shrinks them all (or at least it tries to).
2012-03-07 (first published: 2008-01-14)
3,945 reads
Sending Job Failed Information Through E-Mail Using T-SQL.
2012-03-06 (first published: 2012-02-13)
2,334 reads
Two simple scripts to check table and database sizes. The scripts use temporary tables and the sp_msforeachdb/sp_msforeachtable stored procedures to present the output neatly.
2012-03-05 (first published: 2012-02-19)
2,711 reads
Loads temporary stored procs that assist in running and monitoring server-side tracing.
2012-03-02 (first published: 2012-02-21)
1,150 reads
TSQL code that generates numbers (tally table) from 1 to N without using any tables
2012-03-01 (first published: 2012-02-21)
1,833 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...
Telp/Wa 628218200203 Gedung Sutrado, Jl. Kenari 2 No.5 Lt. 1, RT.2/RW.3, Kenari, Kec. Senen,...
Telp/Wa 628218200203 Jl. Biak No.44 AB, RT.8/RW.11, Cideng, Kecamatan Gambir, Kota Jakarta Pusat, Daerah...
Telp/Wa 628217555651 Gedung Plaza Bank Index Ground, Jl. M.H. Thamrin No.57 Floor Suite GF-21,...
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