How to Compare Tables in SQL Server
One of our customers has recently asked me the following question (I changed just the business case):
The Problem
“I have a...
2015-12-22
550 reads
One of our customers has recently asked me the following question (I changed just the business case):
The Problem
“I have a...
2015-12-22
550 reads
If you’ve worked with SQL Server for any length of time, you’ve run into this error:
Msg 8152, Level 16, State...
2015-12-21
1,067 reads
By Steve Bolton
…………In the last edition of this amateur series of self-tutorials on goodness-of-fit testing with SQL Server, we discussed...
2016-01-04 (first published: 2015-12-21)
2,121 reads
It’s Monday time for this week’s weekly blog and twitter round-up for last week. If you haven’t already, follow me...
2015-12-21
455 reads
Sometime in the next couple weeks Rodney & Karla Landrum are moving from Orlando to Pensacola (home). I’m happy for them...
2015-12-21
623 reads
I’ve always found the best way to learn a new programming language is to start building stuff, solving problems, using...
2015-12-21
971 reads
Every now and again it can be very helpful to know what the current database context is when you are...
2015-12-21
678 reads
We’ve been using the wrong data types for all the wrong reasons. DBAs, developers, data architects, etc. have all been...
2015-12-21
991 reads
Most data warehouses have at least a couple of Type 2 Slowly Changing Dimensions. We use them to keep history...
2015-12-21
998 reads
This is one the articles in the series of step by step SSIS tutorial. In this post, we are going...
2015-12-20
848 reads
By Steve Jones
I caught this interesting item over on Pinal Dave’s blog: Eleven Interview Questions that...
By Hemantgiri
I use color-coded connections in SSMS to distinguish Production, Pre-Production, UAT, and Development. But...
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