Modify data type

  • I have a table where one of the columns is defined as numeric (12,0). This table already contains rows.

    I want to modify the attribute so that it is numeric (12,2).

    When I execute the following :-

    alter table test3

    alter column amt1  numeric (12,2)

    I get the errors :-

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

    Arithmetic overflow error converting numeric to data type numeric.

    The statement has been terminated.

    Can it be done via a cast/convert statement and if so, can somehow please enlighten me?

    Many thanks.

     

     

  • I've found the answer. I should be altering the column to numeric (14,2).

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

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