sorting of a price field

From: Anne Wainwright <anotheranne(at)fables(dot)co(dot)za>
To: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: sorting of a price field
Date: 2013-09-14 12:07:58
Message-ID: 20130914120758.GA30897@fables.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jov 2013-09-14 12:19:01 Re: sorting of a price field
Previous Message DFE 2013-09-14 05:41:13 Re: PostgreSQL 9.3 Error when trying to run Create Extension postgis