SQL Server : Part 7 : Non clustered index on non unique column
In our earlier post, we have discussed about the non clustered index, but there we were always discussing about unique...
2013-03-24
3,571 reads
In our earlier post, we have discussed about the non clustered index, but there we were always discussing about unique...
2013-03-24
3,571 reads
Reading/scanning SQL Server Logs is a required DBA work item in all my work environments. I know there are lots...
2013-03-29 (first published: 2013-03-24)
2,609 reads
SQL Server SMO is a great resource for DBAs, unfortunately, before PowerShell, it is a pretty deep learning curve to...
2013-03-27 (first published: 2013-03-23)
2,724 reads
I had a post last month, MDX #25 – Slicer or Sub-Cube?, verifying that the query context did not change with...
2013-03-22
1,256 reads
I love my MacBook Air. It’s small, light, and it works well as a traveling laptop for me. It starts...
2013-03-22
1,739 reads
It’s just coming up in just a few more weeks… this is the first SQL Saturday in Fargo. North Dakota...
2013-03-22
626 reads
Welcome to this Friday’s reblog summary post. The aim of these posts is to bring some old posts that newer...
2013-03-22
666 reads
April is going to be a fantastic month! I am slated to have quite a few speaking and training opportunities...
2013-03-22
680 reads
Occasionally in forums and on client sites I see conditional subqueries in statements. This is where the developer has decided...
2013-03-26 (first published: 2013-03-22)
3,591 reads
I’m writing this because I was thinking about a member of the local PASS chapter on the way home last...
2013-03-29 (first published: 2013-03-22)
1,205 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