Database Weekly

SQLServerCentral Editorial

Moving on but not far

  • Editorial

During my technical career, I’ve changed companies several times. I even worked as an independent contractor for three years. One thing I have never done before was switch departments and roles within one company. That’s about to change in a couple of weeks as I move from Simple Talk Editor and DevOps Advocate in Marketing […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2022-05-21

118 reads

SQLServerCentral Editorial

What will convince you to upgrade?

  • Editorial

You’ve probably heard that SQL Server 2022 is on the way, and, assuming the name doesn’t change, it will be later this year. That is great news for folks in the data platform community as features and improvements they’ve been hoping for are added. I’m not currently supporting any production SQL Servers, but I’m still […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2022-04-30

139 reads

SQLServerCentral Editorial

Constant Azure Improvement

  • Editorial

This week I noticed a number of changes in the Azure platform from their change feed. Actually, every week has a crazy number of changes across the entire platform, but this week a number of these were related to data and databases. That isn't always the case, but I saw some interesting items. We have […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2022-04-16

108 reads

SQLServerCentral Editorial

Document yourself out of a job

  • Editorial

Some organizations have policies in place to make sure that everything in their IT infrastructure is documented. There are runbooks, procedures, wikis, diagrams, charts, code comments, and more to make sure that knowledge is available if an employee leaves or when disaster strikes. Not only does the documentation exist, but it’s also organized and easy […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2022-04-09

244 reads

SQLServerCentral Editorial

SQLBits Report

  • Editorial

Last week I attended my first in-person event in over two years. SQLBits, the largest data platform conference in Europe, was a hybrid event and marked the first time many of us met in person in ages. It was a huge success as folks from around the world gathered to learn...and celebrate! I heard several […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2022-03-19

124 reads

SQLServerCentral Editorial

Please include your DDL

  • Editorial

I haven’t done it much the past few years, but I would answer some programming questions posted in forums back in the day. In the late 90s, I answered Visual Basic questions and eventually switched to SQL Server questions here on SQL Server Central as my career progressed. Answering questions not only assisted someone else, […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2022-02-05

149 reads

SQLServerCentral Editorial

T-SQL Requires the Right Approach

  • Editorial

Some of the most problematic T-SQL code I’ve seen over the years originated because the developer approached T-SQL with techniques more suitable for developing applications. I often saw these issues in my consulting days and always took the opportunity to teach the customer instead of only fixing the problems. One reason is that SQL is […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2022-01-15

242 reads

SQLServerCentral Editorial

Education to solve the tech skills shortage

  • Editorial

I’ve been teaching T-SQL to groups of students since 2014 at the non-profit LaunchCode in St. Louis. LaunchCode provides free tech training, paid apprenticeships, and career support to hundreds of people who have the ability and interest but not always the opportunity to land tech careers. For example, not having a college degree can eliminate […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2021-12-31

425 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