Subject Strange sorting with collate de_de II
Author Guido Klapperich
Normally when you sort a text field ascending with collate de_de
Blank-Character ( ) comes before Slash-Character (/). I have the
following test table

CREATE TABLE NEW_TABLE (
FIELD_DE_DE VARCHAR(50) COLLATE DE_DE,
FIELD_ISO VARCHAR(50) COLLATE ISO8859_1
);

I add always in both fields the same data. First I add
'Name aa' and 'Name/aa'.

insert into NEW_TABLE (field_de_de,field_iso) values ('Name aa','Name aa');
insert into NEW_TABLE (field_de_de,field_iso) values ('Name/aa','Name/aa');

Now I run

select * from NEW_TABLE order by field_de_de asc

and I get the result as expected.

Name aa
Name/aa

Then I add 'Name bb' and 'Name/bb' and run the query again.

insert into NEW_TABLE (field_de_de,field_iso) values ('Name bb','Name bb');
insert into NEW_TABLE (field_de_de,field_iso) values ('Name/bb','Name/bb');

I expected

Name aa
Name bb
Name/aa
Name/bb

because blanks come before slashes, but I got

Name aa
Name/aa
Name bb
Name/bb

If I run the query

select * from NEW_TABLE order by field_iso asc

I get the expected result.

Now is this a bug in the collate de_de or do I have the wrong
expectations? I use FB 2.0.2.


Regards

Guido