Database Weekly

SQLServerCentral Editorial

Greener Grass

  • Editorial

Before I start the whining (whinging if you prefer), let me just say I have the greatest job in the world. I'm exceedingly lucky to have it. I'm grateful as can be. And someone else (looking at you Tim) can get it when they pry it from my dead cold fingers. With that out of […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2025-06-16 (first published: )

183 reads

SQLServerCentral Editorial

Feeling your age? How would you know?

  • Editorial

As this idea is being born, I am sitting in a dueling piano bar and I have never felt so old ever. And I don’t mean physically. I have only recognized about 1/4 of the songs being played, and everyone just seems younger than me. Even the people I think are older seem younger as […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2025-04-05

96 reads

SQLServerCentral Editorial

Subscribing to a Great New Year

  • Editorial

It is December 27, and the most significant day of the year for reviewing your life is quickly approaching. New Year’s Day is probably the most positive day of the year when people, in all manner of situations, think back to the previous rotation around the earth and decide what they will do better this […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2024-12-28

86 reads

SQLServerCentral Editorial

The Pervasive Nature of Open Source

  • Editorial

This week there was a headline that said "Open Source Software Powers 96% of Modern Applications, New Study Finds" and if you stopped reading there, you might think, hey, it's not in the apps I work on. Or you might think that because you use OSS software, most of the world also does. Microsoft, Oracle, […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2024-12-07

125 reads

SQLServerCentral Editorial

Lies You Should Believe - Anything is possible

  • Editorial

We have all heard the saying I based this week's editorial on. It has been credited to Benjamin Franklin and goes like this, “You can do anything you set your mind to”. This is such a powerful way of thinking when you are starting a task. “I can do it, no matter what anyone says.” […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2024-11-30

155 reads

SQLServerCentral Editorial

PASS Summit Time

  • Editorial

As the Simple Talk Editor, I have had the privilege of attending numerous conferences these past few years, and all of them have been somewhere between great and amazing. Still, there is something a bit more special about the PASS Summit. Even before I started this position, I have been to the PASS Summit events […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2024-11-02

87 reads

SQLServerCentral Editorial

Being an extroverted introvert at a conference

  • Editorial

As I start this editorial, I am sitting at a PostgreSQL conference in New York City during the nighttime reception. The sound of 100 voices is not quite deafening, but it is certainly loud and understanding anyone in this group would be hard. It is also hard because I only know about four people at […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2024-10-05

107 reads

SQLServerCentral Editorial

Knowing What You Don't Know

  • Editorial

I used to think I knew everything. I felt like I had the world all figured out. But then, when I went to kindergarten, I realized that I didn't know much at all. As I grew older and finished college, I regained confidence in my knowledge and again felt like I knew everything about the […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2024-09-07

169 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