You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/*this script works on Firebird 2.0.3, but on 2.1.0 give errors*/
CREATE DOMAIN DOM_TEST NUMERIC (8,3);
/*ok*/
ALTER DOMAIN DOM_TEST TYPE NUMERIC (8,4);
/*
This operation is not defined for system tables.
unsuccessful metadata update.
New scale specified for column DOM_TEST must be at most 3.
*/
ALTER DOMAIN DOM_TEST TYPE NUMERIC(8,2);
/*ok*/
ALTER DOMAIN DOM_TEST TYPE NUMERIC(8,3);
/*This operation is not defined for system tables.
unsuccessful metadata update.
New scale specified for column DOM_TEST must be at most 2.
*/
CREATE TABLE TEST (A NUMERIC (8,4));
ALTER TABLE TEST ALTER A TYPE NUMERIC (8,3);
/*ok*/
ALTER TABLE TEST ALTER A TYPE NUMERIC (8,4);
/*
This operation is not defined for system tables.
unsuccessful metadata update.
New scale specified for column A must be at most 3.
*/
The text was updated successfully, but these errors were encountered:
This is "as designed". You are not allowed to use ALTER to decrease the maximum possible value stored. A switch from NUMERIC(8, 3) to NUMERIC(8, 4) reduces the integral part of the value from 5 to 4 decimal digits and existing values may not satisfy the new definition. The same rule applies to strings: you can extend the field but cannot truncate it. So, actually, it was a bug in v2.0 which has been fixed in v2.1.
It causes so much trouble for not having this feature on FireBird, what is your suggestion to solve this issue without dropping the table and re-create because table has dependencies and I need to drop all the dependencies just to increase a decimal scale?
Submitted by: Miroslav Djorov (miro)
/*this script works on Firebird 2.0.3, but on 2.1.0 give errors*/
CREATE DOMAIN DOM_TEST NUMERIC (8,3);
/*ok*/
ALTER DOMAIN DOM_TEST TYPE NUMERIC (8,4);
/*
This operation is not defined for system tables.
unsuccessful metadata update.
New scale specified for column DOM_TEST must be at most 3.
*/
ALTER DOMAIN DOM_TEST TYPE NUMERIC(8,2);
/*ok*/
ALTER DOMAIN DOM_TEST TYPE NUMERIC(8,3);
/*This operation is not defined for system tables.
unsuccessful metadata update.
New scale specified for column DOM_TEST must be at most 2.
*/
CREATE TABLE TEST (A NUMERIC (8,4));
ALTER TABLE TEST ALTER A TYPE NUMERIC (8,3);
/*ok*/
ALTER TABLE TEST ALTER A TYPE NUMERIC (8,4);
/*
This operation is not defined for system tables.
unsuccessful metadata update.
New scale specified for column A must be at most 3.
*/
The text was updated successfully, but these errors were encountered: