Quickly Compare Data in Two Tables Using CHECKSUM and CHECKSUM_AGG
There are times when we need to compare two tables and figure out if the data matches. I often see...
2018-12-31 (first published: 2018-12-18)
4,247 reads
There are times when we need to compare two tables and figure out if the data matches. I often see...
2018-12-31 (first published: 2018-12-18)
4,247 reads
I’ve just signed up on Microsoft’s new learning opportunity Microsoft Learn. The main categories are Azure, Business Apps, and Windows...
2018-12-31
435 reads
(2018-Dec-31) Back in July of 2018, Ontario provincial government of Canada decided to decrease the number of Toronto city wards from 47...
2018-12-31
1,423 reads
This post is part 2 in a series about physical join operators (be sure to check out part 1 – nested...
2018-12-31 (first published: 2018-12-18)
3,001 reads
I mean, it can’t be that my calendar shows December and the year is almost over? Alright, I see I...
2018-12-30
207 reads
Earlier this week, I blogged about the automatic cleanup process that purges old data from the SSIS catalog logging tables. This nightly process removes data for operations that are...
2018-12-30
13 reads
Earlier this week, I blogged about the automatic cleanup process that purges old data from the SSIS catalog logging tables....
2018-12-30
363 reads
Yesterday i shared the first article in a three part series about the SQL Black Box Recorder, that you can...
2018-12-30
335 reads
The diagnostics process will trap various server related health (diagnostics) information related to the SQL Server instance in an effort to try and detect potential failures and errors.
Related Posts:
SQL Servers...
2018-12-30
134 reads
in my previous post I wrote about how easy it is to add the tSQLt unit test framework to your...
2018-12-29
456 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