Error While running PowerShell code from SQL Agent job – “Path Does Not Exist”
Issue: When I am running code from PowerShell console its running fine but when I execute it through SQL agent...
2017-01-23
1,052 reads
Issue: When I am running code from PowerShell console its running fine but when I execute it through SQL agent...
2017-01-23
1,052 reads
SQL is pretty verbose compared to some languages. It's a pretty big disappointment that I have to type out select...
2017-01-23
229 reads
I like to think of myself as a fairly hardworking, motivated person. However I recently met someone who regularly gets...
2017-01-23
318 reads
One of the most common mistakes people make when writing T-SQL is using a function in the where clause, and...
2017-01-23
2,246 reads
SQL is pretty verbose compared to some languages. It's a pretty big disappointment that I have to type out select...
2017-01-23
494 reads
You are probably wondering what this is, quite honestly I was wondering too. Well it is an extended events session...
2017-01-23
1,937 reads
This was a good meeting. About 50 attendees showed up at Nova (we use their space for joint meetings) to...
2017-01-23
380 reads
This page is a table of contents for for several new and forthcoming posts. I’m posting a series of excerpts...
2017-01-22
533 reads
Continuation from the previous 95 parts, the whole series can be found at http://www.nikoport.com/columnstore/.
This blog post is focused on a...
2017-01-22
694 reads
Dear All,Very happy to share the news that I have been awarded Microsoft Most Valuable Professional award for my contributions to SQL Server Community in 2016!!!. This is an...
2017-01-22
6 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