pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Christoph Haller <ch@rodos.fzk.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: Bug with ORDER BY expression [ ASC | DESC ] ?
Date: Wed, 22 May 2002 09:56:49 -0400
Message-ID: <23760.1022075809@sss.pgh.pa.us> (raw)
In-Reply-To: <200205221317.PAA26760@rodos>
References: <200205221317.PAA26760@rodos>

Christoph Haller <ch@rodos.fzk.de> writes:
> select distinct on (o.sid,o.timepoint,o.lid,o.mid) o.sid,o.timepoint,o.lid,o.mid,o.value 
> from onfvalue o, tempreftime t 
> where o.sid=t.sid and o.timepoint=t.timepoint and o.lid=t.lid and o.mid=t.mid
> order by o.sid,o.timepoint,o.lid,o.mid,o.entrancetime desc;

> but the result is coming in ascending order. 

Perhaps you meant to say

order by o.sid desc, o.timepoint desc, o.lid desc, o.mid desc, o.entrancetime desc;

			regards, tom lane



view thread (3+ messages)

Message-ID: <23760.1022075809@sss.pgh.pa.us>
Permalink:  ../23760.1022075809@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23760.1022075809@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ch@rodos.fzk.de
  Subject: Re: Bug with ORDER BY expression [ ASC | DESC ] ?
  In-Reply-To: <23760.1022075809@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox