Panic Attack
I had a minor panic attack recently where I was getting ready for bed and all of a sudden thought...
2010-02-16
892 reads
I had a minor panic attack recently where I was getting ready for bed and all of a sudden thought...
2010-02-16
892 reads
Note: After I completed this post Aaron Bertrand added this subject to his “Bad Habits to Kick” series for myself...
2010-02-16
879 reads
Over and over again we are told that the DMV’s only hold data since your last reboot. So, how do...
2010-02-16
2,606 reads
Live Writer tends to be one of those applications that you spend a few minutes configuring and then you forget...
2010-02-16
584 reads
This is tightly related to another of my forays into tuning some slowly/poorly performing processes. This process came across my...
2010-02-16
882 reads
I will presenting at the Colorado Springs SQL Server User’s Group (CSSQLUG) on Wednesday, May 19, 2010. I will be...
2010-02-16
646 reads
Huh? My story? Okay. It was never easy for me. I was born a poor black child. I remember the...
2010-02-16
1,134 reads
I’m getting my first look at a full-fledged nHibernate database developed by consultants for our company. I thought I’d share...
2010-02-15
1,303 reads
I used to think that I would run out of things to write about, but a decade after starting to...
2010-02-15
882 reads
A couple of weeks ago, it was announced that the SQL Saturday franchise was voluntarily transferred to PASS . This change...
2010-02-15
1,178 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