Renaming a column in Sql Server
We often need to change the name of a column of a table to a new name. We can do...
2010-09-06
729 reads
We often need to change the name of a column of a table to a new name. We can do...
2010-09-06
729 reads
Happy Labor day to everyone. A day off for me, but I’m posting a few bloopers from the past couple...
2010-09-06
1,104 reads
Yesterday I attended an internal training course on social networking. The class was targeted toward the 100 level, but like...
2010-09-03
427 reads
Cross-posted from The Goal Keeping DBA:
Re-learning how to think is always a difficult process. My oldest son is starting the...
2010-09-03
1,503 reads
Another month has crept up upon us. It is time once again for the Las Vegas User Group /PASS Chapter...
2010-09-03
498 reads
People have been screaming from rooftops for a month now about the PASS election process, ever since a beloved member...
2010-09-03
971 reads
Puzzle #7 had an interesting twist. You were required to add a column to the result set that dynamically displayed...
2010-09-03
603 reads
Tuesday
PASS Performance Virtual Chapter - Introduction to SQL Server Statistics - Andy Warren
Wednesday
Idera - Building a Data Mart with Integration Services - Stacia Misner
SQL...
2010-09-03
908 reads
I am not a Reporting Services guru and nor do I play one on TV. I am however forced to...
2010-09-03
2,659 reads
Six trips left to close out this year. Most are very short, so that’s good, but still, it’s a bunch...
2010-09-03
319 reads
By Steve Jones
I caught this interesting item over on Pinal Dave’s blog: Eleven Interview Questions that...
By Hemantgiri
I use color-coded connections in SSMS to distinguish Production, Pre-Production, UAT, and Development. But...
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