T-SQL Enhancements: FIRST_VALUE() and LAST_VALUE()
A couple a weeks ago I blogged about a few of the enhancements in the OVER clause, and now I...
2011-08-30
4,640 reads
A couple a weeks ago I blogged about a few of the enhancements in the OVER clause, and now I...
2011-08-30
4,640 reads
I’ve finished my 3rd book as part of my year long commitment to read and review professional/personal development books. I...
2011-08-30
769 reads
Few weeks ago I released my SSMS productivity add-in and it has already almost 200 downloads. Responses are quite warm...
2011-08-29
857 reads
I’d never been to Oklahoma City, and when Kristin Ferrier asked me to come to SQL Saturday #90 and do...
2011-08-29
925 reads
I've done it; I've violated one of the rules I give to people who are interested in blogging: I went...
2011-08-29
769 reads
It’s time to get your server side trace on, with a little practical application!
I introduce this whole concept in Applied...
2011-08-29
780 reads
When doing ETL, you have the choice of using T-SQL or SSIS. What things should you consider when deciding which...
2011-08-29
10,263 reads
This series of blog posts are related to my presentation, The Top Ten Skills You Need, which is scheduled for...
2011-08-29
3,463 reads
A common request I have received over the years is to move or copy files from one directory to another...
2011-08-29
10,589 reads
Since I posted a ways back on retrieving the identity value for inserts in SQL Server Integration Services, I've learned many things - one of which is an inline solution for...
2011-08-29
66 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