• Haev a quick investigation - one of the tables has a datatype of image and is trying to sum the image size which is then greater than an int.

    This is for the section relating to the fixed data size.

    select CASE WHEN COLUMN_DATATYPE = 'int' then 4

    WHEN COLUMN_DATATYPE = 'bigint' then 8

    WHEN COLUMN_DATATYPE = 'smallint' then 2

    WHEN COLUMN_DATATYPE = 'tinyint' then 1  

    WHEN COLUMN_DATATYPE = 'datetime' then 8

    WHEN COLUMN_DATATYPE in ('ntext','text') then 16

    WHEN COLUMN_DATATYPE like 'var%' then 0

    else COLUMN_LENGTH end AS Fixed_Data_Size

    ,*

    from DST_SCHEMATABLE

    where TABLE_NAME not like 'dst_%'

    AND COLUMN_DATATYPE not LIKE 'n[c-b-v]%'

    Andre: For my purposes I can remove add something in the script to exclude image datatypes. So need to take this into account when runing the sample.

    regards,