pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedORDER BY question
2+ messages / 2 participants
[nested] [flat]
* ORDER BY question
@ 2003-02-27 10:09 Grant Henderson <granth@fusion-advertising.co.uk>
0 siblings, 1 reply; 2+ messages in thread
From: Grant Henderson @ 2003-02-27 10:09 UTC (permalink / raw)
To: pgsql-php
I have a field with names in which I wish to sort using ORDER BY.
The data comes back as [A-Z][a-z]
Apple
Blackberry
Kiwi
aardvark
banana
It should be [Aa-Zz]
aardvark
Apple
banana
Blackberry
Kiwi
They seem to be sorting using the ASCII equivelant.
Is there any way to do a case insensitive sort?.
Thanks in advance
Grant
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: ORDER BY question
@ 2003-02-27 10:54 Adrian Tineo <adriantineo@softhome.net>
parent: Grant Henderson <granth@fusion-advertising.co.uk>
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Tineo @ 2003-02-27 10:54 UTC (permalink / raw)
To: pgsql-php
>Is there any way to do a case insensitive sort?.
Try:
SELECT colum_name
FROM table_name
ORDER BY upper(colum_name);
For a list of support functios like upper() check this url:
http://www.postgresql.org/docs/aw_pgsql_book/node92.html
_________
Adrian Tineo
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-02-27 10:54 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-02-27 10:09 ORDER BY question Grant Henderson <granth@fusion-advertising.co.uk>
2003-02-27 10:54 ` Adrian Tineo <adriantineo@softhome.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox