Re: sorting of a price field
От | Jov |
---|---|
Тема | Re: sorting of a price field |
Дата | |
Msg-id | CADyrUxMpk_+CkBdbr6UZt2A3uVrdqx75rqT8NLNAhnuwZqe_hw@mail.gmail.com обсуждение исходный текст |
Ответ на | sorting of a price field (Anne Wainwright <anotheranne@fables.co.za>) |
Ответы |
Re: sorting of a price field
|
Список | pgsql-novice |
what is the type of field?try order by shop_price::numeric.
jov
On Sep 14, 2013 8:06 PM, "Anne Wainwright" <anotheranne@fables.co.za> wrote:
Hi,
I run a fairly simple query to show current records of stock using the
phrase 'sort by shop_price'.
Surprise (but really no surprise) this is sorted in ascii order rather
than shop_price order. So 110.00 comes before 20.00
I can't see any reference to changing this. What can I do, is this
perhaps to do with the field type, can it be changed?
Thanks
Anne
--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
В списке pgsql-novice по дате отправления: