Mechanism To Dynamically Build Pivot Table
Script to build PIVOT queries with an arbitrary number of columns
2018-10-25 (first published: 2018-10-15)
1,025 reads
Script to build PIVOT queries with an arbitrary number of columns
2018-10-25 (first published: 2018-10-15)
1,025 reads
A script we use in our company, that rebuilds online=on by default, but takes care of special exceptions.
2016-07-28 (first published: 2014-06-06)
2,415 reads
2013-06-06 (first published: 2009-03-16)
2,664 reads
If you ever need a quick way to generate random passwords, this is a pretty useful way to do so.
2013-05-15 (first published: 2008-09-24)
3,384 reads
Using opendatasource to retrieve data from Excel files as if querying a table.
2011-03-22 (first published: 2009-01-27)
11,916 reads
Sometimes you need to scan a large number of datetime columns for most recent access.
2010-06-08 (first published: 2010-05-04)
1,882 reads
A hopefully useful script to delete old files, not just backups, and make use of the archive bit.
2009-01-01 (first published: 2008-12-09)
2,525 reads
A quick way to get a snapshot of what data types are being used in all user tables.
2008-12-04 (first published: 2008-10-02)
1,139 reads
2008-11-06 (first published: 2008-09-12)
1,084 reads
A short script you can incorporate into any 2005/2008 code to get the full schema.table.
2008-09-29
675 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