Video Test
One of the things I've been wanting for awhile is the ability to embed videos here on the blogs. It's...
2010-07-14
447 reads
One of the things I've been wanting for awhile is the ability to embed videos here on the blogs. It's...
2010-07-14
447 reads
I’ve never had to do this in production, and I’ve only practiced it a few times, but I think this...
2010-07-14
2,270 reads
You just have to love Red Gate tools. They find the small area that they want to cover and then...
2010-07-14
1,881 reads
Here we go again with another round of T-SQL Tuesday fun this time brought to you by recent SQL Certified...
2010-07-13
639 reads
I finally received all the components of my SQL Server test cluster (pictured left), which includes:
–One PowerVault MD3000 DAS with...
2010-07-13
566 reads
This month’s T-SQL Tuesday topic is hosted by Robert Davis and the topic is “How do you learn? How do you teach?...
2010-07-13
1,357 reads
Advanced Troubleshooting Week at SQL University, Lesson 1
Welcome to Advanced Troubleshooting Week at SQL University. Once again, I’m your guest...
2010-07-13
5,449 reads
Have you ever written a query that just seems to take forever? You have looked it over time and time...
2010-07-13
985 reads
Observe and Report
This month we get to frolic in our memories of school days. Thanks to HeadMaster Robert Davis (Blog...
2010-07-13
804 reads
T-SQL is a very forgiving language. As long as you have the basic syntax of the statement correct, SQL Server...
2010-07-13
428 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