Results 1 to 3 of 3

Thread: [RESOLVED] [MS SQL SERVER 2000] resize numeric value..

  1. #1

    Thread Starter
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036

    Resolved [RESOLVED] [MS SQL SERVER 2000] resize numeric value..

    Hi.
    I a table with several fields declared as decimal(3,1) not null i am trying to change it to decimal(3,2) not null.

    alter table artenc alter column prazo_ind decimal(3,2) not null
    Server: Msg 8115, Level 16, State 8, Line 1
    Arithmetic overflow error converting numeric to data type numeric.
    The statement has been terminated.

    Any suggestions? Thanks.
    "The dark side clouds everything. Impossible to see the future is."

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: [MS SQL SERVER 2000] resize numeric value..

    decimal(3,2) means the range of values you can store in this field are from -9.99 to 9.99

    Obviously, an existing value like 10.5 falls outside this range, thus the error.

    If you want to change to 2 decimal places use decimal(4,2).

  3. #3

    Thread Starter
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036

    Re: [MS SQL SERVER 2000] resize numeric value..

    Thanks its working now.
    "The dark side clouds everything. Impossible to see the future is."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width