2018-08-24 (first published: 2014-06-17)
718 reads
2018-08-24 (first published: 2014-06-17)
718 reads
Dynamic SQL can be used to generate a database snapshot. Useful for a database with a number of files.
2018-08-23 (first published: 2016-11-04)
3,575 reads
2018-08-13 (first published: 2018-07-18)
712 reads
2018-08-08 (first published: 2018-07-22)
453 reads
A quick script that provides the sizes of the tables in your database, including schema and choice of sort method
2018-08-07 (first published: 2018-07-29)
828 reads
2018-07-17 (first published: 2018-06-26)
938 reads
SQL Functions that simplify search and operations over strings on SQL Server (starting with 2012)
2018-07-11 (first published: 2018-07-06)
4,939 reads
This script is intended to demonstrate how we can create a stored procedure for the user responsible for backing up user databases in a default storage location.
2018-07-10 (first published: 2018-07-05)
543 reads
2018-07-09 (first published: 2018-07-04)
529 reads
The T-SQL script created a databases using the default file locations from SQL server configuration and prints them in the end.
2018-07-05 (first published: 2018-06-28)
1,972 reads
By Steve Jones
Here are the resources for my talk at Day of Data Boston. Slides –...
By Steve Jones
I’ve covered the values in a number of previous posts on the Book of...
By Arun Sirpal
When the evidence names the database, it says so. When it doesn’t, it stops....
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