Subject How to increase character field size
Author mariofb123
In Firebird 2, I am trying to increase the size of the existing field
from 5 to 10 characters.
The following SQL query does work, but only for a specific data set:
update RDB$FIELDS set
RDB$FIELD_LENGTH = 10,
RDB$CHARACTER_LENGTH = 10,
RDB$CHARACTER_SET_ID = NULL
where RDB$FIELD_NAME = 'RDB$648'

Other datasets that need to be updated automatically have different
internal RDB$FIELD_NAME numbers (i.e. different from RDB$648)
The actual name of the field is LITTERMARK and the table name is
PROGENY. The field type is VARCHAR (5).
I have tried the following, but it does not work:
update RDB$FIELDS set RDB$FIELD_LENGTH = 10, RDB$CHARACTER_LENGTH = 10
where (RDB$FIELD_NAME = 'LITTERMARK') and (RDB$RELATION_NAME = 'PROGENY')

How to structure this query to change the LITTERMARK field size in a
generic way, irrespective of the internal RDB$FIELD_NAME number ?

Regards,
Mario