Awesome new features in SQL Server 2011 “Denali”: IIF and CHOOSE functions
SQL Server 2011 “Denali” introduces two new features for flow control which may help you to keep your T-SQL cleaner than...
2011-08-02
634 reads
SQL Server 2011 “Denali” introduces two new features for flow control which may help you to keep your T-SQL cleaner than...
2011-08-02
634 reads
We recently ran into a case where connecting to a Windows Server 2003 server with SQL Server installed on it,...
2011-08-02
15,682 reads
This editorial I wrote ran on SQLServerCentral a couple weeks back and generated a lot of comments, and more than...
2011-08-02
305 reads
If you haven’t visited the SQL Saturday website you should take a look. There are SEVEN events planned during September around...
2011-08-02
559 reads
Are you tired of doing self joins, just to get the value of a column in the previus/subsequent row, or...
2011-08-02
1,724 reads
Last month, I started using Meetup to schedule SQL Server Study Group events. The idea is to meet twice a...
2011-08-02
946 reads
Oh no you, you got the Could not load type ‘Microsoft.AnalysisServices.SharePoint.Integration.ReportGalleryView’ error!!! What to do now? Why did you get...
2011-08-02
1,068 reads
SQL FUNCTION: -
Function in a database can be defined as the code segment consisting of a logical group of SQL...
2011-08-02
2,992 reads
Since it is August 1, 2011 (which is also my birthday), I thought it would be a good time to...
2011-08-01
1,042 reads
Interesting topic this month posted by Thomas LaRock. This month he has chosen “crap code” as the topic. I think it is interesting because there really are so many...
2011-08-01
13 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