Skip site navigation (1) Skip section navigation (2)

Re: [Fwd: Re: no ORDER BY in subselects?]

From: Louis-David Mitterrand <cunctator(at)apartia(dot)ch>
To: sqllist <pgsql-sql(at)postgresql(dot)org>
Subject: Re: [Fwd: Re: no ORDER BY in subselects?]
Date: 2000-09-20 18:25:56
Message-ID: 20000920202556.A1388@styx (view raw or flat)
Thread:
Lists: pgsql-sql
On Wed, Sep 20, 2000 at 09:20:25AM -0700, Josh Berkus wrote:
> > At 15:23 20/09/00 +0200, Louis-David Mitterrand wrote:
> > >
> > >ERROR:  parser: parse error at or near "order"
> > >
> > >Aren't ORDER BY clauses allowed in subselects?
> > >
> > 
> > It is a very very sad fact, but, no, they're not.
> 
> Hmmmm ... can't say as I've ever seen an ORDER BY in a subselect before.
> Why would you want one?

If only to do a "LIMIT 1" on it. But this is probably considered very
ugly to exprienced DB users (I'm only recently self-taught on that
subject).

> And if you do want one, Louis-David, you can always use a temporary
> table as previously described.

I found another workaround to the problem, finally.

Thanks

-- 
Louis-David Mitterrand - ldm(at)apartia(dot)org - http://www.apartia.org

Your mouse has moved. Windows must be restarted for the change
to take effect. Reboot now?

In response to

pgsql-sql by date

Next:From: Mitch VincentDate: 2000-09-20 18:37:07
Subject: Re: sql query not using indexes
Previous:From: Stephan SzaboDate: 2000-09-20 18:23:51
Subject: Re: sql query not using indexes

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group