Script Login Differences
Compare the logins and users on two instances and generate a TSQL script to make them the same.
2015-02-26 (first published: 2013-11-15)
2,901 reads
Compare the logins and users on two instances and generate a TSQL script to make them the same.
2015-02-26 (first published: 2013-11-15)
2,901 reads
Determine when a Stored Procedure was created and last altered.
2015-02-25 (first published: 2013-12-26)
3,508 reads
Generate script to drop any unwanted user created statistics.
2015-02-24 (first published: 2013-12-26)
1,546 reads
I have received some comments on getting total space of table and all indexes. Therefore I rewrote previous query and it returns total space used, space used by heap table or clustered index and space used by non-clustered indexes.
2015-02-23 (first published: 2014-01-18)
3,177 reads
This function is used to calculate the actual unit of conversion for velocity/speed.
2015-02-20 (first published: 2014-12-11)
586 reads
2015-02-19 (first published: 2014-02-03)
1,944 reads
Template to create a Type 6 slowly changing dimension stored procedure
2015-02-17 (first published: 2014-02-21)
2,950 reads
This function is used to calculate the actual unit of conversion for pressure.
2015-02-13 (first published: 2014-12-12)
583 reads
2015-02-12 (first published: 2010-03-12)
4,996 reads
Rename Foreign Key Constraints in a consistent manner. Ideal for preventing constraint errors during code promotion.
2015-02-09 (first published: 2013-03-19)
1,394 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