Using a CTE with a T-SQL Pivot Statement
During a T-SQL class that I was recently teaching I was asked if a PIVOT could be performed using a...
2010-03-09
9,615 reads
During a T-SQL class that I was recently teaching I was asked if a PIVOT could be performed using a...
2010-03-09
9,615 reads
Introduction
For that past couple of months I have been chasing performance issues with one of the most high profile servers...
2010-03-09
513 reads
(Punch it, Hurb
Yo, I don't think we should talk about this
Come on, why not?
People might misunderstand what...
2010-03-09
2,006 reads
Saw this article about more elbow room, the premise being that is it is often cheaper to buy a second...
2010-03-09
358 reads
T-SQL Tuesday #004: IO -- Where Are My TempDB Objects?
This blog entry is participating in T-SQL Tuesday #004, hosted this month...
2010-03-09
1,468 reads
Two years old. In March of 2008 I received a whopping 96 visits. I’m up to 1900 so far this...
2010-03-09
537 reads
Once again it is that time. It is TSQL Tuesday. This time it is being hosted by Mike Walsh. Mike...
2010-03-09
1,376 reads
“IO IO, It’s off to disk we go!” was in Mike Walsh’s blog post that introduced this TSQL Tuesday and...
2010-03-09
577 reads
It’s time for the March T-SQL Tuesday and this month Mike Walsh picked the topic. It’s I/O and you can...
2010-03-09
469 reads
This is an excerpt from my free eBook, Brad’s Sure Guide to SQL Server 2008.
There is one thing every...
2010-03-09
1,288 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