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
>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
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
✖
By continuing to browse this website, you agree to the use of cookies. Go to Privacy Policy.