Useful T-SQL queries and scripts to work in SQL Server
This post is about some queries and scripts that I use in my daily work on SQL Server. Some of...
2018-12-26 (first published: 2018-12-05)
7,356 reads
This post is about some queries and scripts that I use in my daily work on SQL Server. Some of...
2018-12-26 (first published: 2018-12-05)
7,356 reads
Advent of Code 2018 – Day 4
As I explained in a recent post, I’m participating in this year’s Advent of Code...
2018-12-25 (first published: 2018-12-05)
2,451 reads
Many people work in a tightly controlled environment. Every change requires a change control form and approval to make a...
2018-12-25 (first published: 2018-12-06)
2,531 reads
Despite the controls in place there always seems to be some change that is unknown or even some cowboy that makes changes as s/he sees fit and forgets to...
2018-12-25
20 reads
A common excuse for not delving into extended events seems to be the jump from Profiler to extended events. There...
2018-12-25
770 reads
I enjoy when the Avent of Code comes around each year. I seem to make this a December (or sometimes...
2018-12-24
330 reads
Yesterday I posted about journaling with my goal being to track the time I spend on SQLOrlando (I’ll exclude time...
2018-12-24 (first published: 2018-12-05)
1,638 reads
Indexing on In Memory OLTP tables is a little different from your traditional on-disk rowstore tables…
In Memory Differences…
There is no...
2018-12-24 (first published: 2018-12-04)
2,949 reads
Wish you all a Merry Christmas and may this festival bring abundant joy and happiness in your life!
From
Technology with Vivek Johari
2018-12-24
37 reads
Wish you all a Merry Christmasand may this festival bring abundant joy and happiness in your life!
From Technology with Vivek Johari
2018-12-24
180 reads
By Steve Jones
Here are the resources for my talk at Day of Data Boston. Slides –...
By Steve Jones
I’ve covered the values in a number of previous posts on the Book of...
By Arun Sirpal
When the evidence names the database, it says so. When it doesn’t, it stops....
Comments posted to this topic are about the item Split Large Queries in Athena...
Comments posted to this topic are about the item 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 SallyI 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