Subject | Re: [firebird-support] Raising the scale of a NUMERIC field |
---|---|
Author | Mark Rotteveel |
Post date | 2012-10-29T16:20:15Z |
On Mon, 29 Oct 2012 13:32:16 -0200, "Carlos H. Cantu"
<listas@...> wrote:
numbers. Eg from (15,4) to (15,8) a value 54321.1234 would become
5.43211234
Firebird stores NUMERIC (and DECIMAL) as an INT (or BIGINT or SMALLINT)
and the scale is used to decide the position of the decimal.
Mark
<listas@...> wrote:
> I need to change the scale of numeric domain from (15,4) to (15,8).No, a direct system table update like that would rescale all your existing
>
> I cannot use the ALTER command, since FB doesn't allow such change.
> BUT I'm 100% sure that all the existing data would perfectly fit in
> (15,8) so, the question is: In this case, is it safe to make the
> change direct in the system table?
>
> update RDB$FIELDS set
> RDB$FIELD_SCALE = -8
> where RDB$FIELD_NAME = 'RDB$nnnn';
numbers. Eg from (15,4) to (15,8) a value 54321.1234 would become
5.43211234
Firebird stores NUMERIC (and DECIMAL) as an INT (or BIGINT or SMALLINT)
and the scale is used to decide the position of the decimal.
Mark