Still time to enter the SQL Clone contest
You could win an Amazon Echo from Redgate. Our contest is still open for a few days, so post a...
2017-04-26
593 reads
You could win an Amazon Echo from Redgate. Our contest is still open for a few days, so post a...
2017-04-26
593 reads
I was chatting on the SQL Community Slack with my friend Sander Stad b | t about some functions he is writing for...
2017-04-26
450 reads
You’re reading this series of posts because you want to learn about databases and how to use them. What you...
2017-04-26
106 reads
Sometimes we, as data professionals, have to think outside the box. I know, crazy idea right? Each shop and situation...
2017-04-26
443 reads
Cue Princess Jasmine. What do I mean “Cue Princess Jasmine”? Well because starting today, it’s a “Whole New World for You & Me” What on Earth am I talking...
2017-04-26
14 reads
Cue Princess Jasmine. What do I mean “Cue Princess Jasmine”? Well because starting today, it’s a “Whole New World for You & Me” What on Earth am I talking...
2017-04-26
18 reads
Cue Princess Jasmine. What do I mean “Cue Princess Jasmine”? Well because starting today, it’s a “Whole New World for You & Me” What on Earth am I talking...
2017-04-26
148 reads
Cue Princess Jasmine.
What do I mean “Cue Princess Jasmine”?
Well because starting today, it’s a “Whole New World for You & Me”
What...
2017-05-03 (first published: 2017-04-26)
3,039 reads
I had this question come up at work the other day and while I knew it was true I wasn’t...
2017-05-08 (first published: 2017-04-26)
3,866 reads
I promised a recap/review on my first SQLBits event so I finally got around to it, hopefully you will find...
2017-04-26
501 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