SP_SPACEUSED & SP_MSTABLESPACE
Take a look two SP inside the sys Procedure in SQL Server 2008 (included also in the SQL Server 2005),...
2010-03-22
4,561 reads
Take a look two SP inside the sys Procedure in SQL Server 2008 (included also in the SQL Server 2005),...
2010-03-22
4,561 reads
I have been awarded the MVP award from Microsoft a few years in a row and it’s an honor, but...
2010-03-22
673 reads
After a great response to my last post on Certification, I need to post my thoughts on 70-450 PRO: Designing,...
2010-03-22
584 reads
Did you know that PASS has virtual chapters, allowing members to participate in virtual meetings that are geographically agnostic? One...
2010-03-22
1,223 reads
This post comes from a conversation I had with a developer last week as well as my experiences over the...
2010-03-22
1,822 reads
Isn’t free enough? If you go to a free event do you have a right to complain? Or, if you...
2010-03-22
982 reads
After blogging on Live Spaces for a couple of years, I’ve made the difficult decision to move to my own...
2010-03-21
524 reads
There's an exciting new product on the market, and Pearl Knows is in on the ground floor, and wanted to share.
If...
2010-03-21
683 reads
My last post showed a little script that I use for taking full backups of all my databases on an...
2010-03-21
7,804 reads
Our SQL Server Reporting Services Recipe book was released in April. This is
a cookbook style book for experienced SSRS designers...
2010-03-21
548 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