Declaring a Complex PK in a CREATE TABLE: #SQLNewBlogger
Recently I was talking with someone who had not named any of the primary keys (PKs) in their database. They used system generated names and when they ran comparisons,...
2025-02-03
108 reads
Recently I was talking with someone who had not named any of the primary keys (PKs) in their database. They used system generated names and when they ran comparisons,...
2025-02-03
108 reads
This post looks at a logic problem asked to an AI, and which is struggles at finding an answer. This is based on an article noting this question stumps...
2025-02-07 (first published: 2025-01-31)
301 reads
You are never too young to wonder “Why am I still doing this?” You need to have an excellent answer – from Excellent Advice for Living I’d say that...
2025-01-31
15 reads
I wrote about getting the Redgate Test Data Manager set up in 10 minutes before, and it was a great post. In that one, the sample database Northwind was...
2025-03-06 (first published: 2025-01-29)
44 reads
I have a presentation recently on Continuous Integration Using Local Agents in Azure DevOps and one of the things I do in there is get a PAT for Azure...
2025-02-05 (first published: 2025-01-27)
409 reads
I ran a small ollama model in a container and have been doing some experiments. One of the things I wanted to do was get a GUI so I...
2025-01-27
185 reads
amoransia – n. the melodramatic thrill of unrequited love; the longing to pine for someone you can never have, wallowing in devotion to some impossible person who could give...
2025-01-24
65 reads
One of the things that I like about the Data API Builder (DAB) is that there is a lot of CLI work that can be done. However, lots of...
2025-01-22
143 reads
I was experimenting with a local model (article) and as a part of this, I pulled down a web interface for my model in a container. I ran it...
2025-01-31 (first published: 2025-01-20)
421 reads
Redgate Monitor has grown tremendously from its early days and I find many customers using this to monitor lots of servers, like thousands. In those cases, some of tasks...
2025-02-03 (first published: 2025-01-20)
332 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