The answer is quite simple: this statement was composed by several functions
used for ordering on string values as also on numeric.
--- Thomas Kellerer schrieb am So, 15.8.2010:
> Von: Thomas Kellerer
> Betreff: Re: [GENERAL] Wrong "ORDER BY" on a numeric value result
>
Stefan Wild wrote on 15.08.2010 10:36:
column is numeric, but upper() works on text, and returns
text, so your
numeric column got casted to text by using upper (which is
pointless
anyway - there is no "upper" version of digits).
remove upper() and you'll be fine.
Thank you guys! That was the
Thank you guys! That was the point.
--- hubert depesz lubaczewski schrieb am So, 15.8.2010:
> Von: hubert depesz lubaczewski
> Betreff: Re: [GENERAL] Wrong "ORDER BY" on a numeric value result
> An: "Stefan Wild"
> CC: pgsql-general@postgresql.org
> Datum:
On Sat, Aug 14, 2010 at 09:46:37PM +, Stefan Wild wrote:
> Hello guys,
>
> I have following sorting problem and need your help. When executing this
> SELECT statement:
>
> "SELECT d.id, d.name,
> d.description, ts.name, d.opentimestamp,
On 14 August 2010 22:46, Stefan Wild wrote:
> Hello guys,
>
> I have following sorting problem and need your help. When executing this
> SELECT statement:
>
> "SELECT d.id, d.name,
> d.description, ts.name, d.opentimestamp,
2010/8/14 Stefan Wild
> Hello guys,
>
> I have following sorting problem and need your help. When executing this
> SELECT statement:
>
> "SELECT d.id, d.name,
> d.description, ts.name, d.opentimestamp,
> d.initialvalue,d.plmoney,
Hello guys,
I have following sorting problem and need your help. When executing this SELECT
statement:
"SELECT d.id, d.name,
d.description, ts.name, d.opentimestamp,
d.initialvalue,d.plmoney, d.per