This script will quickly generate DML to search all the tables in the current database for a given string. It could be modified to execute the generated code if desired. If you are running this in a <2005 environment, convert the VARCHAR(MAX)s to VARCHAR(8000) and be careful of overflowing the variable if you have very wide tables. To use this script, simply set the value of @SearchItem to whatever string it is you are searching for on line 2 then run in the database you wish to search.
Creating a PDF from a Stored Procedure in SQL Server
A short but interesting article, the author has figured out a way to create a PDF from a stored procedure without using a third party library.
2019-09-20 (first published: 2003-08-26)
73,225 reads