On 24-7-2015 21:37, Aldo Caruso [email protected] [firebird-support] wrote: > In the process of moving the data back and forth, using a temporary > field of the right character set, you have to drop the original field an > then recreate it. > > The process of dropping a field is a bit nasty because you have first to > comment all the strored procedures and triggers in which this field is > used, drop the field, and then uncomment those stored procedures and > triggers. > > I wonder if the following strategy has any pitfall: > > 1) Create the temporary field of the right character set > 2) Fill it with data, using CAST to OCTETS as suggested by "The Firebird > Book" > 3) Alter the original field type, changing it to the right character set > 4) Fill it with data from the temprorary field > 5) Drop the temporary field > > Notice that only the 2nd step could raise conversion errors, and you > have to manage them there. > In the 4th step no error could occur since both fields are of the same > type and character set.
That would probably work, but you might have to recreate triggers, views and stored procedures anyway. I am not sure if the generated BLR contains assumptions/behavior based on the original format. Mark -- Mark Rotteveel
