Database Weekly

SQLServerCentral Editorial

Being A Bit Less Comfortable in 2024

  • Editorial

I hate coming up with ideas for editorials, but my last editorial of the year gives me a very simple topic just staring me in the face: New Year’s Resolutions. Love them or hate them (or it we are honest, a good bit of both,) this end of one year and the start of another […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2023-12-30

182 reads

SQLServerCentral Editorial

Love

  • Editorial

Love is many a splendored thing. It is also a much-abused word with many different (and twisted) meanings. The type of love I wish to speak about today is not friendship, nor the kind of thing that makes your heart go pitter patter in the springtime, but rather the type of love known as storge, […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2023-12-09

84 reads

SQLServerCentral Editorial

A rose by any other name would not be a rose

  • Editorial

William Shakespeare once wrote in the play Romeo and Juliet: “What's in a name? That which we call a rose, by any other word would smell as sweet.” It is a beautiful sentiment in that context, and even still you might say that there is some truth to this saying in a lot of ways.  […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2023-11-04

1,973 reads

SQLServerCentral Editorial

Confidence

  • Editorial

Today, I want to blog about something I have only limited knowledge of … confidence. Okay, I understand what confidence is, and I have seen it before in the real world and not just in biographical movies. In fact, I have met quite a few highly confident people. In almost every case, it was immediately […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2023-10-07

109 reads

SQLServerCentral Editorial

Servicing SQL Server

  • Editorial

I've been traveling in Europe this week, partially for holiday and partially for work. It's been a nice break, and it's always interesting to experience the world in different places, away from the United States where I've spent most of my life. I get to come often, and I enjoy the experience, but I'm sometimes […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2023-09-16

148 reads

SQLServerCentral Editorial

What Counts For a DBA: Manners

  • Editorial

When most people were young, they had someone telling them to "Mind your manners." Such classics as: "Keep your elbows off of the table," "Use a fork," "Put on deodorant," as well as "Don't chew with your mouth open" were bandied about like there were laws of nature. However, manners differ significantly from laws in […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2023-08-12

164 reads

Blogs

Goodbye, Microsoft

By

A few years ago I took a new job at Microsoft, working as a...

The SUM of Nothing: #SQLNewBlogger

By

I caught this interesting item over on Pinal Dave’s blog: Eleven Interview Questions that...

How to Move the SSMS Status Bar to the Top and Color-Code SQL Server Connections

By

I use color-coded connections in SSMS to distinguish Production, Pre-Production, UAT, and Development. But...

Read the latest Blogs

Forums

Today's AI

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Today's AI

Split Large Queries in Athena with a Simple Modulo Trick

By Rahul Gupta

Comments posted to this topic are about the item Split Large Queries in Athena...

Finding Trailing Spaces

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Finding Trailing Spaces

Visit the forum

Question of the Day

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        Sally
I 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