2012-05-22 (first published: 2012-05-01)
841 reads
2012-05-22 (first published: 2012-05-01)
841 reads
Find a string in any "string" (char, varchar, nchar etc) column in the database.
2012-05-18 (first published: 2007-12-19)
5,781 reads
Calculates the nth due date for any given date, while accounting for weekends.
2012-05-16 (first published: 2007-10-11)
3,817 reads
This script maps the primary key - foreign key relations regardless if the column names are the same or not.
2012-05-15 (first published: 2007-11-07)
2,995 reads
A script to generate a recovery script for setting your sa account back to the password it is using at the time of running this script.
2012-05-14 (first published: 2012-04-09)
1,009 reads
Searches database for up to 4 keywords. It will search through SPs, UDFs, Triggers, SSIS packages, jobs, table names, and column names.
2012-05-10 (first published: 2012-04-18)
2,222 reads
2012-05-09 (first published: 2012-04-19)
1,376 reads
An interesting recursive CTE to list out the non-alphanumeric characters in a column of a table.
2012-05-08 (first published: 2012-04-12)
3,030 reads
2012-04-30 (first published: 2012-04-04)
692 reads
This topic explains the log shipping if the primary database is suspected or corrupted and how you can convert the secondary database into primary database.
2012-04-27 (first published: 2012-03-31)
1,021 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