| От | Doug McNaught |
|---|---|
| Тема | Re: numeric SORT order |
| Дата | |
| Msg-id | m3y9ih6uaj.fsf@varsoon.denali.to обсуждение исходный текст |
| Ответ на | Re: numeric SORT order (Ben Ausden <benedict@navyblue.com>) |
| Список | pgsql-general |
Ben Ausden <benedict@navyblue.com> writes: > thanks Mitch. > the problem is that casting to int won't work for non-numeric data > (obviously), and I can't guarantee that values in this column will > definitely be numeric... I should have made that clearer in my post. Ideally > I'd like to sort numbers in numeric order and text in regular alphabetic > order, like: 1,2,3,40,50,a,b,c,d,e...[etc] Then you'll need to write a custom comparison operator and do "ORDER BY ... USING my_op". -Doug -- Let us cross over the river, and rest under the shade of the trees. --T. J. Jackson, 1863
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера