PowerSQL – Identify a Head of the Database Blocks and Generate Automated Alert across all listed SQL Instances
This is going to be a simplest way of capturing and sending some useful information via an email of ‘N’...
2013-05-06
757 reads
This is going to be a simplest way of capturing and sending some useful information via an email of ‘N’...
2013-05-06
757 reads
For those that follow me on twitter (@StrateSQL), you’ll know that throughout the day I tweet out some links of...
2013-05-06
431 reads
I’ve been getting a funky error with a new Powershell script, running as a SQL Agent job step. Let’s pretend for the...
2013-05-06
764 reads
Recently at work we had a “Hawaiian Shirt Day”, a nice change from the usual business casual. I picked one...
2013-05-06
593 reads
Did you know that the GO command isn’t really part of T-SQL? It’s what’s called a batch separator. And in...
2013-05-06
923 reads
You have changed your database to single_user mode to do a task. As you go about your business, you lose track of which connection was the single_user connection. You...
2013-05-06
19 reads
You have changed your database to single_user mode to do a task. As you go about your business, you lose...
2013-05-06
795 reads
I know that it has been a while, and I apologize. I have been traveling around the U.S. evangelizing SQL...
2013-05-06
1,395 reads
To identify default data and log directories in SQL Server 2012 you can use SERVERPROPERTY() function. In SQL Server 2012...
2013-05-06
925 reads
As promised, here are the presentations and sample code I used at the 2013 Carolina Code Camp. If you attended...
2013-05-06
1,017 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