Arithmetic overflow in 9.00.3054

  • Greetings all,

    I have encountered an 'interesting' problem and was wondering if anyone else has seen similar. Running the query below against version 9.00.3054 throws an Arithmetic Overflow While Converting Numeric error. The query executes successfully on 9.00.3042. Any ideas?

    DECLARE @testVar decimal(9, 5)

    -- Initialize the variable

    SET @testVar = 1.0

    -- This works

    SET @testVar = @testVar + 2.0

    -- Get the result

    SELECT Result = @testVar

    -- This throws an error

    SET @testVar = @testVar * 2.0

    -- Get the result (but you won't get here)

    SELECT Result = @testVar

    go

    Am I missing something? Thanks for any input!

  • You have "Numeric Round-Abort" set to True on the 3054 DB. Change it to false and it will run without a hitch.

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • Neither the db nor the query have ArithAbort on. I am running Developer Edition. On Express it works.

  • Not Arith Abort, but Numeric Round-Abort

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • Jason didn't mention "ArithAbort."

    Try SET NUMERIC_ROUNDABORT OFF

  • As it turns out, the default query setting's configuration changed between versions of the tool I am using.... I now manually 'force' the settings to match those in MS tools. Just another wrinkle in my time-space continuum fabric.

    Thanks for the assist!

Viewing 6 posts - 1 through 5 (of 5 total)

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