This script will allow you to find all instances of a column name, or partial column name, in all user tables in the database in which it is run. This is sometimes helpful during upgrades, etc. There is no error checking in this script. You can modify it to add, if needed.
Run this by simply executing the SP with the column name, or partial, you want to find.
Example: EXEC Find_Columns 'name'
This example will return all column names in all user tables that have the string "name" in them.
Write Reports from SQL to Disk (Even HTML!)
Ever need to write reports out to a folder? I have found that creating output files are SA-WEET! (and easy too) The sample script uses BCP to create an HTML file.This process works well for reports that need to be generated nightly and take too long to run in real time. Use an SMTP mail […]
2002-04-18
4,327 reads