Spoke at #sqlsat81
I presented two sessions this weekend in Birmingham AL at SQL Saturday 81. I was in the first slot of...
2011-07-31
1,454 reads
I presented two sessions this weekend in Birmingham AL at SQL Saturday 81. I was in the first slot of...
2011-07-31
1,454 reads
T-SQL cursors are generally bad approach and are often misused. In today’s world of correlated subqueries, CTE’s, recursive CTE’s, ranking...
2011-07-30
1,953 reads
Introduction
This is the final post to discuss the last Lookup function Multilookup(). The other two – Lookup() and LookupSet() have already...
2011-07-30
11,358 reads
SQL Saturday #85 is quickly approaching. It will be held in sunny Orlando, FL so if you live in the...
2011-07-30
2,067 reads
I was studying SQL Azure parameters some time ago and found out that there are no materials which tell you...
2011-07-29
1,775 reads
Today was an exciting day, since I discovered that fellow SQL Server MVP Brent Ozar (Blog|Twitter) had posted a very...
2011-07-29
1,486 reads
Here is a tip that could make you much more productive: At home, I have a desktop computer with dual-monitors...
2011-07-29
2,299 reads
What had me reflecting on numbers was an article in the Financial Times (Conduit of Contention if you can find...
2011-07-29
1,507 reads
This has been a great week for me. I had a lot of new faces come out for the Columbus...
2011-07-29
1,522 reads
A little over a year ago Patrick LeBlanc wrote a blog post about inserting an unknown row into a dimension. ...
2011-07-29
2,918 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