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,895 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,895 reads
Determine when a Stored Procedure was created and last altered.
2015-02-25 (first published: 2013-12-26)
3,504 reads
Generate script to drop any unwanted user created statistics.
2015-02-24 (first published: 2013-12-26)
1,545 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,176 reads
This function is used to calculate the actual unit of conversion for velocity/speed.
2015-02-20 (first published: 2014-12-11)
581 reads
2015-02-19 (first published: 2014-02-03)
1,943 reads
Template to create a Type 6 slowly changing dimension stored procedure
2015-02-17 (first published: 2014-02-21)
2,948 reads
This function is used to calculate the actual unit of conversion for pressure.
2015-02-13 (first published: 2014-12-12)
580 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,390 reads
By Steve Jones
I caught this interesting item over on Pinal Dave’s blog: Eleven Interview Questions that...
By Hemantgiri
I use color-coded connections in SSMS to distinguish Production, Pre-Production, UAT, and Development. But...
Comments posted to this topic are about the item Split Large Queries in Athena...
Comments posted to this topic are about the item Finding Trailing Spaces
I have some data in a SQL Server 2025 database. It looks like this for the dbo.Customer table:
CustomerID CustomerName PreferredName 1 Steve Steve 2 Andy Andy 3 Brian Brian 4 Allan Allan 5 Devin Devin 6 Steve Steve 7 Sally SallyI want to detect which names have a single trailing space. The CustomerName is a varchar() and the PreferredName is a CHAR(). Does this query detect the problem rows?
SELECT
CustomerID,
CustomerName,
PreferredName
FROM Customer
WHERE CustomerName <> RTRIM(CustomerName)
OR PreferredName <> RTRIM(PreferredName); See possible answers