Re: sorting of a price field

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: sorting of a price field
Date: 2013-09-14 12:21:46
Message-ID: l11kcf$ipr$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Anne Wainwright wrote on 14.09.2013 14:07:
> 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?
>

What datatype is the shop_price column? Also please show us the full query.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Kartik Vashishta 2013-09-14 12:47:06 undefined symbol: boot_DynaLoader
Previous Message Jov 2013-09-14 12:19:01 Re: sorting of a price field