T-SQL Tuesday #74: Be the Change Round-up
Thanks to everybody that participated in this month’s T-SQL Tuesday. A big thanks to everyone who wrote a participating blog...
2016-01-20
671 reads
Thanks to everybody that participated in this month’s T-SQL Tuesday. A big thanks to everyone who wrote a participating blog...
2016-01-20
671 reads
Let’s say you have a port conflict and need to change the port on your Availability Group endpoint. How can...
2016-01-19
1,742 reads
I recently came across Tim Ford’s (B|T) challenge to the technical blogging community. The challenge is to write one introductory...
2016-01-19
413 reads
There’s two fairly common questions I see on the forums around SQL Server’s memory usage. Either the question asks why...
2016-01-19
2,026 reads
Normal DBAs will sum up shrinking a database data file in one word: NO! I’ll talk to you about this subject because I’m not normal. Still, my goal is that...
2016-01-19
52 reads
Normal DBAs will sum up shrinking a database data file in one word: NO!
I’ll talk to you about this subject because...
2016-01-19
1,702 reads
In the previous post, we talked about when you should use identity/sequence as a clustered index key and when it’s...
2016-01-19
1,355 reads
I have been following the series of posts written by my friend and SQL MCM Wayne Sheffield on some TSQL...
2016-01-19
285 reads
Something in SQL Server that isn’t always obvious to beginners is that when you create a default value for a column on a table, SQL Server creates a constraint...
2016-01-19
20 reads
For those not aware SQL Saturday is coming to Melbourne on Sat 20 Feb 2016. SQL Saturday is an excellent free learning resource for all things SQL Server – all costs are...
2016-01-18
12 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