Multiple query plans for the same query?
A while back i was creating a stored procedure to be used for pulling data from the SQL Server into...
2011-10-25
13,751 reads
A while back i was creating a stored procedure to be used for pulling data from the SQL Server into...
2011-10-25
13,751 reads
One of the main goals with this blog is to write stuff when we learn / discover new things or smarter...
2011-10-18
1,490 reads
We all know that SQL Server loves memory, and in my opinion SQL Server can never have to much RAM....
2011-10-11
691 reads
Last week I blogged about how to get help identifying possible missing indexes by using some of the DMV’s provided...
2011-10-04
819 reads
One of the most common things I encounter when asked to help with performance problems, is wrong or inadequate indexing....
2011-09-27
1,421 reads
A few weeks back we did a blog post about a file grow bug that has been fixed with SQL...
2011-09-20
1,638 reads
We have all been in a situation where we had to get the last day of the month with T-SQL....
2011-09-13
5,786 reads
Three months back in this blog post – T-SQL Enhancements in SQL Server Denali (2011) – we promised to do a series...
2011-09-06
1,002 reads
IFF Function
If you are an old Access or Excel “developer” you know this one. This is not a function I...
2011-09-06
2,985 reads
A couple a weeks ago I blogged about a few of the enhancements in the OVER clause, and now I...
2011-08-30
4,640 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