Subject Re: cannot alter column collate. does it exists in FB 2.0?
Author emb_blaster
Many thanks Paul,

as I feared... I was thinking in creating temporary tables copy the
data from original ones, drop original ones. Then I can recreate with
the correct colation and insert the data from temporary table. I don´t
see another way... there´s any?

For example:
CREATE TABLE temp_tb
(
columns....
MyColumn VARCHAR(xx) CHARACTER SET WIN1252 COLLATE PXW_INTL850,
columns....
);

INSERT
INTO temp_tb
SELECT * FROM original_table;

DROP TABLE original_table;

CREATE TABLE original_table
(
columns....
MyColumn VARCHAR(xx) CHARACTER SET WIN1252 COLLATE PXW_INTL850,
columns....
);

INSERT
INTO original_table
SELECT * FROM temp_tb;



--- In firebird-support@yahoogroups.com, Paul Vinkenoog <paul@...> wrote:
>
> Hi,
>
> > So the documentation is correct here: IB6 doesn't support a
COLLATE clause with ALTER COLUMN -- and neither does Firebird.
>
> A nice workaround would seem to define a domain with the desired
type, charset and collation, and then alter the column's type like this:
>
> alter table T alter MyColumn type MyCollatedDomain
>
> ...but alas, this will give MyColumn the type and charset of
MyCollatedDomain, but *not* its collation.
>
> If you add a column to T with type MyCollatedDomain, it *will* get
the collation.
>
>
> Just thought I'd let you know, to cheer you up ;-)
>
>
> Paul Vinkenoog
>