Subject Re: [firebird-support] Changing numeric domain to higher precsion
Author Martijn Tonies
Hello Bob,

> I have the following domain defined and in use by every column used to
> store information on US dollars:
>
> create domain MONEY_D as numeric(9,2);
>
> I have found that some queries are now returning values in excess of
> 10M, which causes an 'arithmetic exception, numeric overflow, or
> string truncation' error.
>
> Is there any problem with modifying this domain to something like,
> say, numeric(15,2)? I'm assuming that all of the tables with columns
> currently defined with domain will automatically be updated without
> problem? Are there any gotcha's I need to look out for?

If this is a Dialect 3 database, it's alright. For a dialect 1 database,
however, the internal datatype will be a "double precision", which
is a floating point datatype that can causes rounding errors.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com