• Now I do not really know why you are doing these calculations, but you could add one more item to the code to give you an overall view of the length of the contents of that table column:

    CREATE TABLE #T(tmessage VARCHAR(200))

    INSERT INTO #T

    SELECT 'Short' UNION ALL

    SELECT 'Longer' UNION ALL

    SELECT 'Even a longer message' UNION ALL

    SELECT 'A realy realy realy extra long message truly really long'

    select SUM(200 -Len(tmessage)) AS WASTED,AVG(200 -Len(tmessage)) AS 'Average Wasted',

    MIN(200 -Len(tmessage)) AS 'Minimum Wasted'

    FROM #T

    DROP TABLE #T

    WASTEDAverage WastedMinimum Wasted

    . . 712 . . . . . 178 . . . . . . .144

    But if you are considering altering the size of columns in a existing table, the above could be more useful.

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]