Difference between Delete and Truncate Command
Although the Delete and Truncate Commands logically does the same work of deleting the rows from the table but still...
2009-12-17
1,273 reads
Although the Delete and Truncate Commands logically does the same work of deleting the rows from the table but still...
2009-12-17
1,273 reads
There was a post recently where someone was asking about securing log shipping to comply with HIPAA requirements. It struck...
2009-12-17
1,234 reads
I've admittedly been a terrible note taker growing up. Throughout most of school, I've always been able to remember everything...
2009-12-17
2,130 reads
Ran across this post from Mark Russinovich titled The Machine SID Duplication Myth that seems to debunk the idea that...
2009-12-16
786 reads
Its quite some time that I blog… but good news is I have some good stuff to blog on… so...
2009-12-16
12,475 reads
Here is the mid-December version of my diagnostic queries for SQL Server 2008. The idea here is to be able...
2009-12-16
992 reads
I turned on my netbook for the first time in a few weeks recently. My laptop had died, and I...
2009-12-16
731 reads
It seems that the SQL community is really growing. There are now quite a few events that you can attend...
2009-12-16
995 reads
I was checking on the status of my laptop the other day. It died and I shipped it back to...
2009-12-16
963 reads
SQLSaturday #37 will be held March 13, 2010 at Mandeville Hall, St. Joseph's University, 5600 City Line Ave, Philadelphia, PA....
2009-12-16
563 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