Sins of a Recursive CTE?
On June 1, 2010, Steve Gray had an article, Sins of SQL: The Time Table, published on sqlservercentral.com. I’m not...
2010-06-03
2,609 reads
On June 1, 2010, Steve Gray had an article, Sins of SQL: The Time Table, published on sqlservercentral.com. I’m not...
2010-06-03
2,609 reads
Recently on the SSC forums, someone asked about how to measure the money in an actual dollar figure that they...
2010-06-02
758 reads
This version has updated build lists for SQL Server 2008 and 2008 R2. It also has several new queries, and...
2010-06-02
1,566 reads
If you are near Pensacola, FL this weekend, I will be speaking at their SQL Saturday on June 5th, 2010. I will...
2010-06-02
753 reads
I guess I will join the trend, and list the session abstracts that I submitted for PASS Summit 2010. There...
2010-06-02
908 reads
In an enterprise with several SQL Server instances it is pivotal that you keep track of each instance and its...
2010-06-02
741 reads
Every day for the next couple of weeks, I aim to highlight one of SQL Server 2008’s new features, simply...
2010-06-02
338 reads
2010-06-02
639 reads
Another recent editorial I wrote for SQLServerCentral talks about whether you would be happy doing your hobby for living. For...
2010-06-02
699 reads
I was never a big fan of temp tables, mostly because there were serious contention issues in SQL Server v6.5....
2010-06-02
1,012 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