2016-05-17 (first published: 2014-08-25)
2,583 reads
2016-05-17 (first published: 2014-08-25)
2,583 reads
2016-05-16 (first published: 2012-10-17)
5,581 reads
Compare the structure/layout of two tables within an instance of SQL Server (version 2012) and return non-matches.
2016-05-13 (first published: 2014-04-23)
2,955 reads
Concatenate columns grouping on Index column (approach for summing varchar columns by grouping on index)
2016-05-12 (first published: 2009-09-13)
1,601 reads
Query that simulates running sp_spaceused on every applicable object in a database and gathering it all into a single result set.
2016-05-10 (first published: 2013-06-03)
2,306 reads
Yet another schedule description query with added grammatical improvements.
2016-05-06 (first published: 2016-04-20)
873 reads
I was recently asked to monitor the Database size on the SQL server, and display the results in a report.
2016-05-05 (first published: 2016-04-16)
825 reads
An enhanced version of a script originally posted by Robert Pearl some time ago. It now takes into account changes in the tabelresults for CHECKDB in latter versions of SQL Server.
2016-05-04 (first published: 2016-04-20)
1,304 reads
searches entire db for a string, number, or date, returns list of results
2016-05-02 (first published: 2016-04-20)
1,281 reads
As part of the application to monitor SQL health I created.
The procedure returns status of the SQL server Agent
2016-04-29 (first published: 2016-04-16)
644 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