| From: | Jov <amutu(at)amutu(dot)com> |
|---|---|
| To: | Anne Wainwright <anotheranne(at)fables(dot)co(dot)za> |
| Cc: | pgsql-novice <pgsql-novice(at)postgresql(dot)org> |
| Subject: | Re: sorting of a price field |
| Date: | 2013-09-14 12:19:01 |
| Message-ID: | CADyrUxMpk_+CkBdbr6UZt2A3uVrdqx75rqT8NLNAhnuwZqe_hw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)fables(dot)co(dot)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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Kellerer | 2013-09-14 12:21:46 | Re: sorting of a price field |
| Previous Message | Anne Wainwright | 2013-09-14 12:07:58 | sorting of a price field |