books

SQLServerCentral Editorial

It's Time to Play

  • Editorial

Writing editorials every few weeks for a technical mailing list has been one of the more challenging responsibilities in my (nearly) two years with Redgate as an advocate working with Steve, Grant, and Louis. Each week, it’s interesting for me to see the mix of technical insights and everyday life stuff that each of us […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2024-08-31

459 reads

SQLServerCentral Article

Protecting SQL Server Data

  • Article

This book holds the key to "encryption without fear". In it, John Magnabosco sweeps away some of the misconceptions surrounding SQL Server's encryption technologies, and demonstrates that, when properly planned and implemented, they are an essential tool in the DBA's fight to safeguard sensitive data.

2017-11-07

3,149 reads

SQLServerCentral Article

SQL Server Tacklebox

  • Article

Inside the SQL Server Tacklebox you'll find day-to-day tools and techniques to automate and standardize SQL Server installation, document and report on your servers, migrate data and manage data growth, troubleshoot performance issues, receive notifications of impending issues, secure access to your servers and fight off the data corruption monster.

2017-11-03

7,313 reads

SQLServerCentral Article

Performance Tuning with SQL Server Dynamic Management Views

  • Article

This is the book that will de-mystify the process of using Dynamic Management Views to collect the information you need to troubleshoot SQL Server problems. It will highlight the core techniques and "patterns" that you need to master, and will provide a core set of scripts that you can use and adapt for your own requirements.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(4)

You rated this post out of 5. Change rating

2017-11-02

10,115 reads

SQLServerCentral Article

Inside the SQL Server Query Optimizer

  • Article

This book will take you from the fundamentals of Statistics, Cost Estimation, Index Selection, and the Execution Engine, and guide you through the inner workings of the Query Optimization process, and throws in a pragmatic look at Parameterization and Hints along the way.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(3)

You rated this post out of 5. Change rating

2017-02-06

27,366 reads

SQLServerCentral Article

SQL Server Execution Plans, Second Edition by Grant Fritchey

  • Article

Every Database Administrator, developer, report writer, and anyone else who writes T-SQL to access SQL Server data, must understand how to read and interpret execution plans. This book leads you right from the basics of capturing plans, through how to interrupt them in their various forms, graphical or XML, and then how to use the information you find there to diagnose the most common causes of poor query performance, and so optimize your SQL queries, and improve your indexing strategy.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(20)

You rated this post out of 5. Change rating

2017-02-02

19,277 reads

SQLServerCentral Article

Troubleshooting SQL Server: A Guide for the Accidental DBA

  • Article

Three SQL Server MVPs, and stalwarts of the SQLServerCentral and MSDN community forums, provide fascinating insight into the most common SQL Server problems, why they occur, and how they can be diagnosed using tools such as Performance Monitor, Dynamic Management Views and server-side tracing. The focus is on practical solutions for removing root causes of these problems, rather than "papering over the cracks".

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(5)

You rated this post out of 5. Change rating

2014-11-11

26,130 reads

SQLServerCentral Article

Confessions of an IT Manager, 2nd Edition - Book

  • Article

The software industry is, just occasionally, more absurd than one would dare to imagine. Having spent most of his working life in its clutches, Phil Factor has pretty much "seen it all" and what's more he's prepared to tell what he knows. The second edition of Phil's "Confessions of an IT Manager" contains Phil's full repertoire of tales of institutional mayhem and software projects gone awry.

2013-10-01

2,692 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