Server sudden shutdown unavailable
It’s not always straightforward to diagnose a server problem. You look through the SQL Server Logs and Event Viewer for...
2011-09-03
1,055 reads
It’s not always straightforward to diagnose a server problem. You look through the SQL Server Logs and Event Viewer for...
2011-09-03
1,055 reads
This is a quick tip to help quickly solve a problem I run into sometimes, and now that I am...
2011-09-02
1,423 reads
Wallflowers Bloom
My friend Tim Mitchell wrote an awesome personal account a while back and shared it again recently. It’s a...
2011-09-02
621 reads
I am super excited to announce that there is a strong demand for the Foundation Training to be held more...
2011-09-02
562 reads
As I mentioned in the introductory post, I’m summarizing posts from previous years in the the past week. Some posts...
2011-09-02
660 reads
One of the things I like to do is take some time on decisions that matter to me. That’s a...
2011-09-02
1,041 reads
Parking places, that’s the topic of my recent editorial on SSC. A simple topic, but one that most of us...
2011-09-02
856 reads
Variables and expressions help make any SSIS package dynamic and flexible. It is always a best practice to use variables...
2011-09-02
1,519 reads
I recently addressed an issue where a client server's data volume was getting dangerously tight on free space. It contained...
2011-09-02
4,398 reads
Question: How do I generate test data for SQL Server ? I don’t want to buy a benchmarking tool, but I...
2011-09-02
950 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