SQL QUERY NIGHTMARE
Last week, we faced a basic and yet the only major problem that sql developers/admin had to deal with and...
2016-10-07 (first published: 2016-09-23)
4,336 reads
Last week, we faced a basic and yet the only major problem that sql developers/admin had to deal with and...
2016-10-07 (first published: 2016-09-23)
4,336 reads
I was riding the elevator up from lunch today, at work. I am relatively new at my job and do...
2016-09-23
494 reads
I wrote about Azure SQL Database for T-SQL Tuesday #82, but I had a few mistakes in my process, at...
2016-09-22
588 reads
You’ve got your team; now you need to find a somewhere to host your event. If you are lucky, you...
2016-09-22
419 reads
This weekend I’ll be traveling to Kansas City, Missouri for their annual SQL Saturday. This particular event is like going home...
2016-09-22
460 reads
I just released an update to the sp_WOxCompliant script to fix a couple of issues. You can download it here! What...
2016-09-22
489 reads
My first Learning Tree SQL Server Newsletter that was sent out back in August was titled SQL Server 2016: Keeping...
2016-09-22
471 reads
A simple but effective setting in SQL Server Management Studio is using custom colours to identify which server you are...
2016-09-22
1,141 reads
This is just a quick note (since I apparently forgot and was puzzled for a moment) that the MDSCHEMA_CUBES DMV...
2016-09-21
498 reads
Welcome back to another episode of This Week In Data! If you missed our previous episodes, you can watch them...
2016-09-21
593 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