Subject | Re: Case sort order/collation order related? |
---|---|
Author | peter_jacobi.rm |
Post date | 2004-05-11T07:41:01Z |
Hi Jorge,
Jorge Andrés Brugger <listas@d...> wrote:
gives the sort order you expect. I just re-checked, to be sure
no silly mistake has changed this.
This is my test script:
set names ISO8859_1;
create database 'C:\es_es.fdb' user 'sysdba' password 'masterkey';
create table t1 (
c1 char(8) character set ISO8859_1,
c2 char(8) character set ISO8859_1 collate ES_ES
);
insert into t1 (c1, c2) values ('abc', 'abc');
insert into t1 (c1, c2) values ('ABC', 'ABC');
insert into t1 (c1, c2) values ('Abc', 'Abc');
insert into t1 (c1, c2) values ('aBc', 'aBc');
insert into t1 (c1, c2) values ('abC', 'abC');
insert into t1 (c1, c2) values ('aaa', 'aaa');
insert into t1 (c1, c2) values ('AAA', 'AAA');
insert into t1 (c1, c2) values ('acc', 'acc');
insert into t1 (c1, c2) values ('ACC', 'ACC');
select * from t1 order by c1;
select * from t1 order by c2;
This are the results of "select * from t1 order by c2;":
C1 C2
======== ========
aaa aaa
AAA AAA
abc abc
abC abC
aBc aBc
Abc Abc
ABC ABC
acc acc
ACC ACC
source tree, I assume, as too much code depends on the
fact, that it is a straightforward codepoint order.
You should be able to set another collation as the default
collation for the ISO8859_1 charset, but this SQL99 feature
isn't implemented in Firebird yet.
You can make ISO8859_1 COLLATE ES_ES the default for your
database, by directly manipulating the system tables, but
this is generally advised against.
Regards,
Peter Jacobi
Jorge Andrés Brugger <listas@d...> wrote:
> Can I check the collation order ES_ES is somewhere? It´s 'fixable'?The ES_ES collation (as all <language>_<country> collations)
gives the sort order you expect. I just re-checked, to be sure
no silly mistake has changed this.
This is my test script:
set names ISO8859_1;
create database 'C:\es_es.fdb' user 'sysdba' password 'masterkey';
create table t1 (
c1 char(8) character set ISO8859_1,
c2 char(8) character set ISO8859_1 collate ES_ES
);
insert into t1 (c1, c2) values ('abc', 'abc');
insert into t1 (c1, c2) values ('ABC', 'ABC');
insert into t1 (c1, c2) values ('Abc', 'Abc');
insert into t1 (c1, c2) values ('aBc', 'aBc');
insert into t1 (c1, c2) values ('abC', 'abC');
insert into t1 (c1, c2) values ('aaa', 'aaa');
insert into t1 (c1, c2) values ('AAA', 'AAA');
insert into t1 (c1, c2) values ('acc', 'acc');
insert into t1 (c1, c2) values ('ACC', 'ACC');
select * from t1 order by c1;
select * from t1 order by c2;
This are the results of "select * from t1 order by c2;":
C1 C2
======== ========
aaa aaa
AAA AAA
abc abc
abC abC
aBc aBc
Abc Abc
ABC ABC
acc acc
ACC ACC
> OrYou can change the ISO8859_1 collation only in your private
> even better, change the ISO8859_1 collation would be great, so I don
> need to specify the collation in order by, group by, etc.
source tree, I assume, as too much code depends on the
fact, that it is a straightforward codepoint order.
You should be able to set another collation as the default
collation for the ISO8859_1 charset, but this SQL99 feature
isn't implemented in Firebird yet.
You can make ISO8859_1 COLLATE ES_ES the default for your
database, by directly manipulating the system tables, but
this is generally advised against.
Regards,
Peter Jacobi