The Trigger Roundup–T-SQL Tuesday #106
This month was my turn to host T-SQL Tuesday. I chose Trigger Headaches or Happiness as the topic, and I...
2018-09-18
894 reads
This month was my turn to host T-SQL Tuesday. I chose Trigger Headaches or Happiness as the topic, and I...
2018-09-18
894 reads
So, what do you really know about bots or how they can help your organization? You may be thinking, Pragmatic...
2018-09-17
182 reads
If you haven’t registered for the 2018 PASS Summit and plan to go, you might press to get registration done...
2018-09-17
872 reads
Read Scale-Out is a little-known feature that allows you to load balance Azure SQL Database read-only workloads using the capacity of...
2018-09-17 (first published: 2018-09-05)
2,550 reads
This was an interesting question I saw posted recently. Through SQL Server 2000, trying to delete a user that owned...
2018-09-17
35,593 reads
tl;dr; VIEW DEFINITION
Every now and again you’ll have a user that needs to be able to see what permissions other...
2018-09-17
348 reads
Somewhere on internet i found this question. Thought to share it with you all.
We have two tables, school_students and Class_student.
...
2018-09-17 (first published: 2018-09-04)
2,504 reads
I love the SQL Source Control product from Redgate. It’s not perfect, and it can be slow to run at...
2018-09-17
240 reads
A question that came up recently around Query Store is what happens when there are log backups in use on...
2018-09-17
221 reads
The requirement of data refactoring is very common and vital in data mining operations. In the previous article, you’ll learn...
2018-09-17
274 reads
By Steve Jones
I caught this interesting item over on Pinal Dave’s blog: Eleven Interview Questions that...
By Hemantgiri
I use color-coded connections in SSMS to distinguish Production, Pre-Production, UAT, and Development. But...
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