Who did what?
This select will show the last sql statement for every open session plus many helpfull information.
2012-01-13 (first published: 2008-03-04)
4,247 reads
This select will show the last sql statement for every open session plus many helpfull information.
2012-01-13 (first published: 2008-03-04)
4,247 reads
Display row value as a TABLE column using SQL select statement
2012-01-12 (first published: 2007-10-26)
4,745 reads
2012-01-11 (first published: 2008-04-16)
5,181 reads
Using this script you can create a list of sql commands for foreign keys manipulation.
2012-01-10 (first published: 2007-11-02)
5,450 reads
2012-01-09 (first published: 2007-11-13)
4,936 reads
2012-01-06 (first published: 2008-02-15)
7,327 reads
2012-01-05 (first published: 2011-12-09)
2,598 reads
Script to restore the LATEST full and differential backups from a SQL Server 2008 R2 backup device.
2012-01-04 (first published: 2011-12-13)
2,211 reads
This script will be useful to quickly check incase of any blocking or log wait occurs
2011-12-30 (first published: 2011-12-05)
1,547 reads
The following script can be used to determine the list of enabled SQL Agent Jobs, their start time, average run duration and next run date.
2011-12-29 (first published: 2011-11-30)
2,194 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