SSoL–Exiting Root
I don’t think most of us need to know Linux, but if you end up managing a system, it’s good...
2017-07-05
598 reads
I don’t think most of us need to know Linux, but if you end up managing a system, it’s good...
2017-07-05
598 reads
We can easily spend tens of thousands of dollars on core licences for SQL Server, and then we go and...
2017-07-05
190 reads
I love Entity Framework. I also like (not love) nHibernate. That’s right, as a DBA and data professional, I’m telling...
2017-07-17 (first published: 2017-07-05)
2,784 reads
Statistics objects are important to us for allowing SQL to make good estimates of the row-counts involved in different parts...
2017-07-05
792 reads
Similar to the default trace the system_health session is automatically started up when the instance starts and collects information about...
2017-07-19 (first published: 2017-07-05)
2,160 reads
Last week in Part Two I went through how to create named volumes and map them to containers in order...
2017-07-19 (first published: 2017-07-05)
3,194 reads
The REPLACE function in SQL Server has until now been quite limited. SQL Server 2017 has introduced a new TRANSLATE...
2017-07-05
1,926 reads
Earlier this week I was working on adding a new feature to Update-DbaTools and while looking at another cmdlet to check syntax/conventions, I noticed an ugly typo in some...
2017-07-05
26 reads
Watch this week's video on YouTube
Temporal Tables are awesome.
They make analyzing time-series data a cinch, and because they automatically track row-level history, rolling-back from an "oops" scenario doesn't mean...
2017-07-04
49 reads
Been working on this blog post for a while, thought I'd share today an inventory of tools I use regularly...
2017-07-04
777 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