Restarting SQL Server using a Batch Script
In a previous post, I showed you how one could Restart, Stop and Start the services for an instance of...
2010-08-29
13,405 reads
In a previous post, I showed you how one could Restart, Stop and Start the services for an instance of...
2010-08-29
13,405 reads
Sometimes you may need to restart your instance of SQL Server. You should rarely do this on Production boxes, but...
2010-08-29
494 reads
First and foremost, I want to thank everyone who attended my presentation today. It got off to a late start due...
2010-08-28
429 reads
If you are intending to take any Microsoft Certification tests soon, you are in luck, because Microsoft has recently introduced...
2010-08-28
1,287 reads
Puzzle #6 should not have presented too much of a challenge, it's intentions were to introduction you to the ORDER...
2010-08-27
501 reads
This was written for something fun on a Friday, but it’s still interesting for coffee talk anytime – what superhero would...
2010-08-27
618 reads
Ran across this in my weekly browsing, Formufit sells furniture grade PVC. I think I’m not quite clear on the...
2010-08-27
1,168 reads
I’m leaving later today for the not too bad drive to Jacksonville for the sixth annual Code Camp. I’ve got...
2010-08-27
554 reads
I am now in the process of arranging the 2nd meeting of the kent sqlserver user group. This will be...
2010-08-27
437 reads
The only scheduled event among the sources I have listed is the one for SQL Lunch, so it looks to...
2010-08-27
599 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