Subject | Re: [firebird-support] change field size painlessly |
---|---|
Author | Helen Borrie |
Post date | 2004-01-10T13:38:41Z |
At 11:28 AM 10/01/2004 +0800, you wrote:
pretty good sign that you are using the wrong message file.
ALTER TABLE MYTABLE
ALTER MYVARCHAR TYPE VARCHAR(99);
You won't be able to make a char or varchar smaller than the largest item
stored in it.
a production copy of your database. It will break any views using the
field and any code in SPs and triggers that feeds your field into
variables. On a copy of your DB, you could drop those dependent objects
quite easily, do Aage's change, and recreate them afterwards. Try backing
up and restoring the altered copy, test the recreated views and SPs, etc.
/heLen
>I need to change a field size of a particular field. But Iam getting aIf you are encountering inappropriate messages (like this one) it's a
>"Implementation of text subtype 255 not located".
pretty good sign that you are using the wrong message file.
>I think its becauseThe correct way to increase a varchar size is
>of dependencies that causing this error.
ALTER TABLE MYTABLE
ALTER MYVARCHAR TYPE VARCHAR(99);
You won't be able to make a char or varchar smaller than the largest item
stored in it.
>My problem is if I have to dropIn short, no. I saw Aage's tip and I strongly recommend not trying that on
>all the views ,triggers, procedures that could be a lot of work. Is
>there a way to have my field size change without touching those views,
>triggers, and procedures.
a production copy of your database. It will break any views using the
field and any code in SPs and triggers that feeds your field into
variables. On a copy of your DB, you could drop those dependent objects
quite easily, do Aage's change, and recreate them afterwards. Try backing
up and restoring the altered copy, test the recreated views and SPs, etc.
/heLen