> On Jun 26, 2007, at 14:41 , kdealba@uaaan.mx wrote:
>> and what I need is the following ("old fashion", that is, the "SPACE"
>> is another character whose ASCII value is before any other LATIN
>> letter's!!)
>> AB CD
>> AB EF
>> ABAB
>> ABD E
What you don't want :
peufeu=> SELECT column1 FROM (VALUES ('ABCD'), ('A BCD'), ('abcd'),
('ABcd'), ('AB'), ('AbC d')) AS foo ORDER BY column1;
column1
---------
AB
abcd
AbC d
ABcd
ABCD
A BCD
(6 lignes)
What you want :
peufeu=> SELECT column1 FROM (VALUES ('ABCD'), ('A BCD'), ('abcd'),
('ABcd'), ('AB'), ('AbC d')) AS foo ORDER BY string_to_array( column1, '
' );
column1
---------
A BCD
AB
AbC d
abcd
ABcd
ABCD
(6 lignes)