Alter Table problem

  • I  have faced one problem. I tried to alter column to increase size of column. But I am getting following error. The column assessorabbr is not foreign key and not related to any table.

     My alter command is

     ALTER TABLE tblAssessor ALTER COLUMN AssessorAbbr VARCHAR(100)  NOT NULL

     Server: Msg 5074, Level 16, State 8, Line 1

    The statistics 'hind_63_9' is dependent on column 'AssessorAbbr'.

    Server: Msg 5074, Level 16, State 1, Line 1

    The statistics 'hind_62_9' is dependent on column 'AssessorAbbr'.

    Server: Msg 4922, Level 16, State 1, Line 1

    ALTER TABLE ALTER COLUMN AssessorAbbr failed because one or more objects access this column.

     

    Can any one help...to solve this... Thanks in advance

     

  • Drop the statistics  'AssessorAbbr' before altering the table and recreate the statistics after the alter. Hope this helps.

    Kind regards,

    Gift Peddie

    Kind regards,
    Gift Peddie

Viewing 2 posts - 1 through 1 (of 1 total)

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