Modifying UDD Length

  • Hi all ,

      I need to increase the length of a UDD . Are there any functions to achieve the same ? I could find only sp_Addtype and sp_droptype.  I was also not able to drop the UDD because some objects (tables,Sprocs ) were using it . Is there any method to alter the length ?

    Regards,

    Guru

     

  • alter table alter column to normal datatype.

    sp_droptype

    sp_addtype

    alter table column back to udd

    You can get table, column list from

    select table_name, COLUMN_NAME  from information_schema.column_domain_usage

     where DOMAIN_NAME = 'UDD'

    or

    update systypes table directly (not recommended)

  • thanx a lot .

    i have modified some types using this method , but , when the types are used in a stored procedure what to do ? sp_droptype is not allowing me to drop it ..

     

  • If stored procedure uses UDD in dynamic fashion, sp_droptype would not be affected.

    Otherwise it always ends up in table column, that mentioned method can be used.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply