I am a Superhero
Two weeks ago I attended SQLBits in London. This is probably the biggest SQL Server conference in Europe, and this...
2015-03-25
616 reads
Two weeks ago I attended SQLBits in London. This is probably the biggest SQL Server conference in Europe, and this...
2015-03-25
616 reads
Last year I purchased a Lenovo W530. Nightmares then ensued. Nice laptop if you just want to use it as...
2015-03-25
618 reads
I have a customer who is having a problem with a load. He is getting a fair number of bad...
2015-03-25
1,107 reads
How many times have you said to yourself, “Someone should build an application that does [x]…”, or “Wouldn’t it be...
2015-03-25
780 reads
I am an IT Professional from the UK with a huge interest in MS technology especially SQL Server and Azure. During...
2015-03-25
316 reads
I like to initialize my arrays by strongly typing my variable as an array, and setting it to null. PowerShell...
2015-03-24
690 reads
The question was this:
This is just a quick/fast snippet in response to that question, but I can think of a...
2015-03-24
471 reads
Saw this on twitter and thought I would throw it up on the blog. Easier than responding on twitter.
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | Out-Null;
$SQLServerInstance...
2015-03-24
412 reads
My cheap and dirty PowerShell script for dumping the disk space usage for a Windows machine. It was originally some...
2015-03-24
471 reads
I’ve been a problem solver as far back as I can remember, always looking for a new challenge. I love...
2015-03-24
264 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