Learn TSQL for free online – starting today
Thanks to the support of Redgate, I’ve launched a new course which teaches you the basics of TSQL. The course is totally free, no logins required — we don’t...
2020-05-11
137 reads
Thanks to the support of Redgate, I’ve launched a new course which teaches you the basics of TSQL. The course is totally free, no logins required — we don’t...
2020-05-11
137 reads
One of the most frequent questions you’ll hear online is how to determine if a particular index is in use. There is no perfect answer to this question. You...
2020-05-25 (first published: 2020-05-11)
444 reads
A good friend of mine (Randolph West (blog|twitter) asked that someone Explain CROSS APPLY like they are 5. So, here’s ... Continue reading
2020-05-25 (first published: 2020-05-11)
1,831 reads
I’ve started to add a daily coping tip to the SQLServerCentral newsletter, which is helping me deal with the issues in the world. I’m adding my responses for each...
2020-05-11
19 reads
(Be sure to checkout the FREE SQLpassion Performance Tuning Training Plan - you get a weekly email packed with all the essential knowledge you need to know about performance...
2020-05-11
20 reads
(Be sure to checkout the FREE SQLpassion Performance Tuning Training Plan - you get a weekly email packed with all the essential knowledge you need to know about performance...
2020-05-26 (first published: 2020-05-11)
266 reads
I’ve started to add a daily coping tip to the SQLServerCentral newsletter, which is helping me deal with the issues in the world. I’m adding my responses for each...
2020-05-08
23 reads
As a part of the Redgate Community Circle, giving back in this strange time, each of the advocates for Redgate is teaching a free course. We’re doing this live...
2020-05-08
149 reads
Twenty something years ago when I started my SQL Server career there was an amazing tool called Query Analyzer. Honestly I’d say if Microsoft did nothing more than bring...
2020-05-27 (first published: 2020-05-07)
909 reads
Kept getting an error Incorrect syntax near the keyword 'read' when running the some updated PowerShell 7 in lambda with the dotnet3.1 sdk. Was troubleshooting loading types thinking I...
2020-05-07
13 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