Tables can't be compared
"I am trying to compare two databases and xSQL Data Compare has marked all table pairs with a red X and...
2017-01-11
212 reads
"I am trying to compare two databases and xSQL Data Compare has marked all table pairs with a red X and...
2017-01-11
212 reads
I posted this, but here it is again. A a shot from our engineer, behind the scenes of my live...
2017-01-11
550 reads
Open any book or article about database development and administration, and I can all but guarantee that you will find a section for database documentation that describes its importance,...
2017-01-11
44 reads
Bit of fun this week with something that a colleague of mine noticed when playing around with SQL Server on...
2017-01-11
1,015 reads
This is an entry level post and a response to SQLEspresso’s blog challenge(http://sqlespresso.com/2017/01/10/ooops-was-that-was-me-blog-challenge) where we share mistakes from our “younger”...
2017-01-11
829 reads
DMV: sys.dm_server_services
Microsoft SQL Server 2008 R2 SP1 and SQL Server 2012 has a new set of DMVs. One of them...
2017-01-11
389 reads
We have all made mistakes in our careers, I thought I’d share one of mine as a quick tip to...
2017-01-10
581 reads
AdvertisementsThis month’s T-SQL Tuesday topic is “SQL Server Bugs & Enhancement Requests” and hosted by my favorite and inspirational Brent Ozar.
Here...
2017-01-10
582 reads
This post is a response to this month's T-SQL Tuesday prompt. T-SQL Tuesday was created by Adam Machanic and is a way for SQL users to share ideas about...
2017-01-10
11 reads
On the second Tuesday of each month, the SQL Server universe all comes together to blog about a topic. Known...
2017-01-10
407 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