Database Weekly

SQLServerCentral Editorial

Taking time off

  • Editorial

Time is a precious commodity, and so much of our time is dedicated to working. IT professionals often have jobs with good benefits, including generous paid time off. It’s important to get away from work to relax and recharge, but, sometimes, it’s difficult to take those days that belong to us. Even when we do […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2021-07-17

116 reads

SQLServerCentral Editorial

What Counts For a DBA: Ego

  • Editorial

Leaving aside, for a second, Freud’s psychoanalytical definitions, the term “ego” generally refers to a person’s sense of self, and their self-esteem. In casual usage, however, it usually appears in the adjectival form, “egotistical” (most often followed by “jerk”). You don’t need to be a jerk to be a DBA; humility is important. However, ego is important […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2021-06-26

306 reads

SQLServerCentral Editorial

What counts for a DBA: Foresight

  • Editorial

Of all the valuable attributes of a DBA, from passion to humility to practicality, perhaps one of the most important attributes may turn out to be the most seemingly nebulous: foresight. According to Free Dictionary, foresight is the "perception of the significance and nature of events before they have occurred". Foresight does not come naturally to most people, as the […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2021-05-15

339 reads

SQLServerCentral Editorial

Looking Forward to SQL Server vNext

  • Editorial

Releases of on-premises SQL Server arrived quite rapidly for a few years with seven releases during the years spanning 2008 and 2019. While it has technically been less than two years since SQL Server 2019 reached general availability in November 2019, it feels like ages since we have heard any news about what’s coming next. […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2021-04-24

1,844 reads

SQLServerCentral Editorial

New Options for Training and Learning

  • Editorial

In 2008, I managed to achieve the goal of becoming a Microsoft Certified Trainer. Once I achieved the status, Microsoft shipped me a binder with dozens of DVDs containing lab VMs and class materials for all the current classes. At some point, instead of receiving DVDs, you were expected to download images which was quite […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2021-03-13

183 reads

SQLServerCentral Editorial

Common Table Expression Misunderstandings

  • Editorial

I frequently use Common Table Expressions (CTEs) when I demo windowing functions and get questions about them. Windowing functions are limited to the SELECT and ORDER BY clause which means that you can’t filter or group on them directly. Using a CTE is one way to separate the logic of the query into multiple steps […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2021-02-27

5,408 reads

SQLServerCentral Editorial

Let it go

  • Editorial

I’ve been digging through the 18 years’ worth of articles, editorials, blogs, contests, interviews, promotions, and announcements over at Simple Talk. There are over 5000 posts, and many are quite outdated, especially those announcing beta versions of software or other time-sensitive content. Some articles haven’t seen the light of day for 10 years, yet some […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2021-02-06

128 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