• Great idea. I usually find it better to use the information_schema views so I altered your stored procedure as follows

    select

    o.[table_name] as 'table_name',

    c.ordinal_position as 'column_order',

    c.[column_name] as 'column_name',

    e.value as 'column_description',

    C.DATA_TYPE as Type,

    coalesce(numeric_precision,character_maximum_length,0) as Length,

    coalesce(numeric_scale,0) as [Decimal Pos],

    C.COLUMN_DEFAULT AS [Default]

    from information_schema.tables o inner join information_schema.columns c on o.table_name =

    c.table_name

    left join ::FN_LISTEXTENDEDPROPERTY(N'MS_Description',

    N'user',N'dbo',N'table', @table_name, N'column', null) e on c.column_name = e.objname

    where o.table_name = @table_name

    Thanks