Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
By Richard Doering,
This is a utility to show how well your column sizes suit your data (or vice versa)..
By default, the script will run for every table in the database you run it in.
This may prove quite time consuming so set the @SCHEMA and @TABLE variables at the top of the script to the schema and table name respectively to analyse only one table.
The output is fairly self explanatory i.e. the name of the name, it's rowcount and column details.
For each column, 3 length values are given (where appropriate)
I had fun creating it, I hope someone (who isn't using SSIS 2008 Data Profiler!) finds it useful.
How to Specify Length of Output Column in SELECT Stmt?
Get longest length of data in a column
This script can be used to generate alter column length of any string data type column(s) in a datab...
Record Length of a Float data type
I have a flat file with over 200 fixed length columns. Is there a way to easily load them into SQL ...