How Do I Identify Invalid or Unneeded Logins?
Introduction
I was looking at one of my servers and was caught off-guard by how many individual users had been granted...
2010-04-07
529 reads
Introduction
I was looking at one of my servers and was caught off-guard by how many individual users had been granted...
2010-04-07
529 reads
Believe it or not, it's already time to start planning for Orlando's next SQLSaturday. Andy Warren and I had our...
2010-04-07
429 reads
Overall, not too bad for the first quarter, but definitely some areas I need to pick up the slack on.
Community...
2010-04-07
485 reads
I stumbled across this clustered index test from Hugo Kornelis recently from a post in the forums. I think I’d...
2010-04-07
548 reads
I'm still way behind on my writing for the year, thanks to fighting off stronger than usual migraines and now...
2010-04-07
1,682 reads
I have three different DMVs for Day 7. The first one is sys.dm_db_missing_index_group_stats, which is described by BOL as:
Returns summary...
2010-04-07
1,235 reads
Catching Transient CPU Spikes Using SQL Trace If there was one thing I wish everyone who works with SQL Server would...
2010-04-06
4,551 reads
S3OLV or SSSOLV will be holding our meeting Thursday April 8th. The User Group is in affiliation with PASS and...
2010-04-06
471 reads
Registration for the 24 Hours of PASS is now open. This free, online training event will be held starting 12:00...
2010-04-06
653 reads
As chance would have it, I had been checking Adam’s blog daily for the last few days to find the...
2010-04-06
1,772 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