SQL Bits 7 – The 7 wonders of SQL
I have been procrastinating this evening, I have several blog posts that I want to write but the football is...
2010-07-08
603 reads
I have been procrastinating this evening, I have several blog posts that I want to write but the football is...
2010-07-08
603 reads
I’ve been scouring my notes (old & new), wading through all my previous research and unearthing advice, tips & tricks that have...
2010-07-08
387 reads
During a recent call I was talking with someone about achieving a career goal (coaching in itself, though unplanned) and...
2010-07-08
767 reads
I saw a post recently by someone asking how to get a database to be suspect. They said they had...
2010-07-08
609 reads
Microsoft has made the Community Technology Preview (CTP) of SQL Server 2008 SP2 available for download. This is Build 3798,...
2010-07-08
1,211 reads
Degree Seeker Week at SQL University, Lesson 2
Welcome once again eager learners to Lesson 2 of Degree Seeker Week at...
2010-07-08
2,255 reads
Recently quite a few MVPs (here, here and here ) are handling out MSDN Ultimate subscriptions in the community. What interests...
2010-07-08
1,179 reads
Every once in a while, you may have a need to determine how much space is being used by a...
2010-07-07
434 reads
This is really late notice – apologies in advance.
We will be holding the LV UG meeting July 8th at the same...
2010-07-07
580 reads
It’s a Bird…
No, not really. It’s just Windows 7. I have recently upgraded to Windows 7. I took the roundabout...
2010-07-07
3,442 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