Alter Multiple Databases at Once
This is a quick and dirty method I often use when I want to make a change to multiple databases...
2018-07-03 (first published: 2018-06-26)
2,519 reads
This is a quick and dirty method I often use when I want to make a change to multiple databases...
2018-07-03 (first published: 2018-06-26)
2,519 reads
This is my favourite SSMS trick I’ve discovered recently, probably some time towards the end of last year.
Basically, when you...
2018-06-06
1,422 reads
Everyone, at the beginning of their SQL career, get’s told that it is important to include an ORDER BY if...
2018-05-30
442 reads
2018-05-29
9,524 reads
Microsoft state that enabling TDE (Transparent Data Encryption) usually has a performance overhead of 2-4%. That doesn’t sound like very...
2018-05-23
2,092 reads
After blogging about SQL Server for just over a year, at some in the last month I went over 100,000...
2018-05-16
473 reads
I manage a few servers used to host SQL Instances for development and test purposes. Each of those instances hosts...
2018-05-02 (first published: 2018-04-24)
2,975 reads
If you’re starting to use cloud services, the number of options available can be confusing. Particularly when they may seem...
2018-04-26 (first published: 2018-04-17)
6,179 reads
This month for T-SQL Tuesday #101 Jens Vestergaard asks us to blog about the essential tools in our SQL Toolbelt.
http://t-sql.dk/?p=1947
I’d...
2018-04-10
1,155 reads
This month for T-SQL Tuesday #101 Jens Vestergaard asks us to blog about the essential tools in our SQL Toolbelt.
http://t-sql.dk/?p=1947
The...
2018-04-10
343 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