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,892 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,892 reads
Determine when a Stored Procedure was created and last altered.
2015-02-25 (first published: 2013-12-26)
3,503 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)
579 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,945 reads
This function is used to calculate the actual unit of conversion for pressure.
2015-02-13 (first published: 2014-12-12)
578 reads
2015-02-12 (first published: 2010-03-12)
4,993 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,389 reads
By Steve Jones
Here are the resources for my talk at Day of Data Boston. Slides –...
By Steve Jones
I’ve covered the values in a number of previous posts on the Book of...
By Arun Sirpal
When the evidence names the database, it says so. When it doesn’t, it stops....
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