T-SQL Tuesday #164: Code that makes you feel
The invitation this month is from Erik Darling, and it’s a neat one. I like this thought, asking us to find code that impressed us or made us feel...
2023-07-26 (first published: 2023-07-11)
455 reads
The invitation this month is from Erik Darling, and it’s a neat one. I like this thought, asking us to find code that impressed us or made us feel...
2023-07-26 (first published: 2023-07-11)
455 reads
It’s been a while, but I’m finally participating in T-SQL Tuesday again! This month Erik Darling (blog|twitter) is hosting. Ever ... Continue reading
2023-07-26 (first published: 2023-07-11)
378 reads
What will be much easier with Microsoft Fabric?
Microsoft Fabric is built on a foundation of Software as a Service (SaaS), which takes simplicity and integration to a whole new...
2023-07-24 (first published: 2023-07-11)
408 reads
A Barebone Script To Generate SQL Script to Create Synonyms
This stored procedure can be used to generate a SQL script to create synonyms for all tables in...
2023-07-12 (first published: 2023-07-10)
130 reads
First, thank you to Guy in a Cube for a great licensing/cost video. My company is exploring what data warehousing technology to use in Azure. I needed to learn...
2023-07-19 (first published: 2023-07-10)
528 reads
While we do maintain an exact inventory of sql servers and their configuration, its too numerous and I often find myself in a need to look up AG connection...
2023-07-10
437 reads
I give a few talks on career topics, and one of these is Branding Yourself for a Dream Job. In the talk, I sometimes tell a story in the...
2023-07-21 (first published: 2023-07-10)
201 reads
My number one reason that you should test your backups is to make sure you know how to restore/recover. The absolute worst time to learn how to restore is...
2023-07-10
34 reads
I thought I might pass along, what I have found to be, the most efficient way to validate the check digit within Azure SQL Server. I was looking to...
2023-07-17 (first published: 2023-07-10)
400 reads
My SQL Server on VMware Accelerator boot camp video series is now live on Youtube! There’s no strings attached and no price of entry, so now there’s no reason...
2023-07-17 (first published: 2023-07-07)
419 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