It is OK its NULL only TIP #103
We always take NULL very lightly. Like if we are designing database then whether it is necessary or not we...
2015-07-15 (first published: 2015-07-06)
2,728 reads
We always take NULL very lightly. Like if we are designing database then whether it is necessary or not we...
2015-07-15 (first published: 2015-07-06)
2,728 reads
The SSIS Project Deployment Model is great! It really is the best thing since sliced bread! I specifically appreciate the...
2015-07-15 (first published: 2015-07-06)
2,812 reads
Hi friends, we will continue with FOR JSON clause in this blog and today we will learn formatting of query...
2015-07-06
381 reads
I frequently see statements on forums along the lines of “I don’t have a test server, so I’m going to...
2015-07-10 (first published: 2015-07-06)
3,149 reads
As we begin to get a grasp of all that is available with SQL Server 2016 and all of the new features, it is a great idea to see...
2015-07-06
39 reads
As we begin to get a grasp of all that is available with SQL Server 2016 and all of the...
2015-07-06
1,272 reads
I love keyboard shortcuts. I’d rather keep my hands on the keyboard than move back and forth to the mouse....
2015-07-13 (first published: 2015-07-06)
2,773 reads
Managing SQL Server can be exhausting, so more and more companies today choose either to delegate this task to some...
2015-07-06
715 reads
Continuation from the previous 57 parts, the whole series can be found at http://www.nikoport.com/columnstore/.
I have previously blogged on the predicate...
2015-07-05
841 reads
Today, the 3rd of July 2015 marks the 2rd anniversary of my very first Columnstore Indexes blog post in the...
2015-07-05
469 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