T-SQL Tuesday #17 – APPLY Knowledge
It’s that time of the month again… again. Time for T-SQL Tuesday! This month’s event is being hosted by Matt...
2011-04-12
1,244 reads
It’s that time of the month again… again. Time for T-SQL Tuesday! This month’s event is being hosted by Matt...
2011-04-12
1,244 reads
Every career, whether on purpose or accident, is a journey from one job or project to another. To achieve great...
2011-04-11
579 reads
I’m going to SQL Rally! Are you going to SQL Rally? Have you heard of SQL Rally?
What’s SQL Rally?
I’m glad...
2011-04-07
424 reads
Use extended events; they work – and make you appear magical.
– “Write a SQL blog post in 11 words or less”...
2011-04-04
631 reads
We’ve seen a few summaries come through by now, so I’m going to throw mine into the mix. To recap...
2011-03-29
681 reads
Yesterday, I went in for my re-take of the MCM written exam. If you recall, I failed the exam last...
2011-03-29
576 reads
Previously, in a TSQL2sDay index summary post, I started a series on the DMV sys.dm_db_index_operational_stats. The series investigates how the...
2011-03-26
858 reads
Last week I spoke at the TechFuse event in Minnesota – out at Mystic Lake Casino. As I mentioned in the...
2011-03-24
483 reads
A couple weeks ago, I got some pretty great new. The book proposal that I had submitted to Apress was...
2011-03-22
637 reads
Twin Cities Code Camp will be hitting the University of Minnesota Campus again next month. This is a biannual event...
2011-03-18
590 reads
By Steve Jones
Here are the resources for my talk at Day of Data Boston. Slides –...
By Steve Jones
I’ve covered the values in a number of previous posts on the Book of...
By Arun Sirpal
When the evidence names the database, it says so. When it doesn’t, it stops....
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