2018-05-01 (first published: 2018-04-20)
1,217 reads
2018-05-01 (first published: 2018-04-20)
1,217 reads
Script that searches every object in a database for a specific string.
2016-06-20 (first published: 2016-05-02)
1,082 reads
Sometimes, you just want to do a search in a SQL Server database as if you were using a search engine like Google. Besides the obvious Full-Text search, Phil Factor describes some of the techniques for finding that pesky data that resists the normal SELECT blandishments.
2014-05-01
8,755 reads
In this script, we can search a Field and Table in all databases on the server, returning the Field value.
2013-11-15
180 reads
Find all columns containing a string value across all tables and schemas.
2012-11-07 (first published: 2012-10-12)
2,118 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,223 reads
Find quickly all stored procedures, tables and views that are somehow related to the search term.
2011-02-09 (first published: 2011-01-28)
2,777 reads
Recently Ben Kubicek created a script that would allow him to copy his production db to a test instance and correct the production specific SQL code in stored procedures and views.
2010-02-03
7,501 reads
2010-02-15 (first published: 2010-01-18)
24,137 reads
This procedure searches for your criteria not only in code, but also in objectnames
2009-11-16 (first published: 2009-10-20)
1,113 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