Daily Coping 19 Oct 2021
I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m...
2021-10-19
25 reads
I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m...
2021-10-19
25 reads
I’m a big fan of comments (MSSQL, Powershell), so along those lines here’s an interesting way to comment an IF-THEN-ELSE ... Continue reading
2021-10-19
72 reads
Here’s an interesting issue that recently came up. We were seeing very high compilations and recompilations on a server to the point that it started causing us some very...
2021-10-29 (first published: 2021-10-19)
350 reads
No doubt there will be times where you need to scale up the actual instance in terms of vCores but also you may want to move across tiers (for...
2021-11-03 (first published: 2021-10-19)
225 reads
Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers. I saw a post on using STRING_SPLIT() with...
2021-10-27 (first published: 2021-10-18)
614 reads
As we all know there is already a lot of information available about SQL Server related topics in English. But I’m also dealing more and more with customers who...
2021-10-18
13 reads
As we all know there is already a lot of information available about SQL Server related topics in English. But I’m also dealing more and more with customers who...
2021-10-18
11 reads
As we all know there is already a lot of information available about SQL Server related topics in English. But I’m also dealing more and more with customers who...
2021-10-18
9 reads
As we all know there is already a lot of information available about SQL Server related topics in English. But I’m also dealing more and more with customers who...
2021-10-18
14 reads
As we all know there is already a lot of information available about SQL Server related topics in English. But I’m also dealing more and more with customers who...
2021-10-18
11 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