SQL Homework – January 2020 – Document, document, document
Happy New Year! It being New Year’s, at least by the Gregorian calendar, I thought we could make this month’s ... Continue reading
2020-01-01
31 reads
Happy New Year! It being New Year’s, at least by the Gregorian calendar, I thought we could make this month’s ... Continue reading
2020-01-01
31 reads
When running into error 1326, it makes plenty of sense to try to create a backup dump device (only as a testing exercise) as well as test the connectivity...
2020-01-01
29 reads
When running into error 1326, it makes plenty of sense to try to create a backup dump device (only as a testing exercise) as well as test the connectivity...
2020-01-01
359 reads
As we open 2020 (and the house is still quiet on this New Year’s Morning), I thought I’d take a moment to reflect on the past year.
Blogging 2019 was...
2020-01-01
20 reads
Validating your server setup is an integral component of your duties as a SQL Server DBA. When performing those validations, it is possible to run into an intriguing difference...
2019-12-31
136 reads
Validating your server setup is an integral component of your duties as a SQL Server DBA. When performing those validations, it is possible to run into an intriguing difference...
2019-12-31
774 reads
With the New Year fast approaching and maybe already having arrived depending on where you are, we thought we’d do a quick recap of our top 5 posts from...
2019-12-31
35 reads
Hello boys & girls! This is the last post in “Last Week Reading” series in this decade. Can you believe that? Have you had a good Christmas time? Have...
2019-12-30
16 reads
Hello boys & girls! This is the last post in “Last Week Reading” series in this decade. Can you believe that? Have you had a good Christmas time? Have...
2019-12-30
23 reads
The trick here is to find a way to search thousands of files quickly and filter easily the bad from the good. Sounds like an opportunity for an automation...
2019-12-30
12 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