SQL Server Removing Duplicates
I know, I know your data could never possibly have duplicates because obviously, you have all the constraints in place...
2019-01-09 (first published: 2019-01-03)
2,997 reads
I know, I know your data could never possibly have duplicates because obviously, you have all the constraints in place...
2019-01-09 (first published: 2019-01-03)
2,997 reads
Azure Key Vault is a service which allows you to keep and manage passwords, certificates and other sensitive information securely....
2019-01-09
290 reads
I like participating in the Advent of Code each year, though my participation often varies wildly as life gets in...
2019-01-09 (first published: 2018-12-28)
2,155 reads
If you are still running SQL Server 2008/2008 R2 you probably have heard by now that as of July 9,...
2019-01-09
62 reads
I’ve done a few posts on Clustered and Non-Clustered indexes before, what I’ve not however covered and something that is...
2019-01-09
251 reads
One of the things that should seem very commonplace to a data professional is the effort to become a lazy DBA. A lazy DBA is not a bad thing....
2019-01-08
17 reads
TSQL Tuesday
The second Tuesday of the month comes to us a little early this month. That means it is time...
2019-01-08
671 reads
After a while the intros for my T-SQL Tuesday posts get a little boring. So without any further ado, it’s...
2019-01-08
212 reads
Azure offers a lot of features that enable IT professionals to really enhance their environment. One feature that I really...
2019-01-08 (first published: 2018-12-28)
2,507 reads
Disclaimer: I’m still learning PowerShell. I’ve been using it more lately and I want to talk about it more. I’ll...
2019-01-08
437 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