Database Weekly

SQLServerCentral Editorial

Getting and keeping fit

  • Editorial

Don't worry, this is a technical editorial, but the initial analogy starts a bit personal. For the past decade, I've been on a journey to get fit, facing setbacks along the way, such as surgery complications and broken bones, torn cartilage, and, most recently, broken metal implants. Throughout this time, my overall physical fitness has […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2024-08-10

105 reads

SQLServerCentral Editorial

The Danger of Safety Assistance Tools

  • Editorial

During a speaker dinner the other week, a lot of topics were swirling around and a few caught my ear. One of these topics dovetailed nicely with a mistake I recently made. More on that later. The discussion was on the effect on safety that all the new safety-based tech is having on driving. Some […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2024-07-13

108 reads

SQLServerCentral Editorial

Is Perfect Software Attainable?

  • Editorial

I was in a social media discussion the other day where someone said “Perfection isn’t real, but progress is.” This started me thinking, is there really no perfection? Can you not actually create a piece of software that is perfect? Of course you can. As long as your requirements are perfect, and the code does […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2024-06-08

123 reads

SQLServerCentral Editorial

Realities of Predictive Analysis

  • Editorial

Or for short, “Why you have to play the game” “Don't tell me the odds”, cried out Han Solo just before doing something that seemed impossible. How on Coruscant did he do that? Well, as a certain director said about a certain floating door in a galaxy we all call home. ”It was in the […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2024-05-18

105 reads

SQLServerCentral Editorial

Do you listen to music when you work?

  • Editorial

I want to make this a participation topic. When you are working, do you listen to music or do you need quiet? And if it isn’t music, do you do something else? TV, movies? For me, it is almost always music. As I write my first Database Weekly newsletter editorial in a few months, I […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2024-04-20

224 reads

SQLServerCentral Editorial

Sharing the Work You Do 

  • Editorial

During one my yearly review, I got one particularly interesting piece of feedback. “You need to share the work you are doing and share with the company.” This is basically a matter of letting people know about the stuff we are putting out on Simple-Talk.com. It is something that is regularly done here, but to […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2024-01-27

112 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