Subject | Strange sorting with collate de_de |
---|---|
Author | Guido Klapperich |
Post date | 2007-04-25T19:04:25Z |
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 (
NEW_FIELD VARCHAR(50) COLLATE DE_DE,
NEW_FIELD1 VARCHAR(50) COLLATE ISO8859_1
);
I add always in both fields the same data. First I add
'Name aa' and 'Name/aa'. Now I run
select * from NEW_TABLE order by new_field 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. 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 new_field1 asc
I get the expected result.
Now is this a bug in the collate de_de or do I have the wrong expectations?
Regards
Guido
Blank-Character ( ) comes before Slash-Character (/). I have the
following test table
CREATE TABLE NEW_TABLE (
NEW_FIELD VARCHAR(50) COLLATE DE_DE,
NEW_FIELD1 VARCHAR(50) COLLATE ISO8859_1
);
I add always in both fields the same data. First I add
'Name aa' and 'Name/aa'. Now I run
select * from NEW_TABLE order by new_field 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. 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 new_field1 asc
I get the expected result.
Now is this a bug in the collate de_de or do I have the wrong expectations?
Regards
Guido