T-SQL Tuesday #22 - Data Presentation - My Example with CTE
Hey, everybody! Welcome to T-SQL Tuesday #22! Today's topic is Data Presentation, and the importance of formatting data to the...
2011-09-13
3,863 reads
Hey, everybody! Welcome to T-SQL Tuesday #22! Today's topic is Data Presentation, and the importance of formatting data to the...
2011-09-13
3,863 reads
We have all been in a situation where we had to get the last day of the month with T-SQL....
2011-09-13
5,786 reads
September 15 Data Arch VC Meeting: Architecture Career Paths for SQL Server Professionals
Subject:Architecture Career Paths for SQL Server ProfessionalsLevel:200 (Intermediate)Start...
2011-09-12
911 reads
As a SQL Server DBA, usually the largest databases in size and in number of users that I had to manage was an ERP...
2011-09-12
844 reads
There are few games that don’t have some kind of strategy, from tic-tac-toe on up. Sometimes we take the time...
2011-09-12
1,159 reads
I have a big rant I add to….well, to every single SQL session I give. That rant is on formatting...
2011-09-12
1,194 reads
I was just checking the event calendar and saw that my Building a Professional Development Plan presentation is on Wednesday...
2011-09-12
767 reads
One week down and we are now 4-weeks from this years PASS Summit. Hopefully, you have already registered for the...
2011-09-12
631 reads
September 15 Data Arch VC Meeting: Architecture Career Paths for SQL Server Professionals
Subject:Architecture Career Paths for SQL Server ProfessionalsLevel:200 (Intermediate)Start...
2011-09-12
826 reads
In the 1970s my mother and her younger sister married U.S. Marines. Both came to the States when their husbands...
2011-09-12
806 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