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

no ORDER BY in subselects?

From: Louis-David Mitterrand <cunctator(at)apartia(dot)ch>
To: pgsql-sql(at)postgresql(dot)org
Subject: no ORDER BY in subselects?
Date: 2000-09-20 13:23:04
Message-ID: 20000920152303.A3939@styx (view raw or whole thread)
Lists: pgsql-sql
auction=# SELECT (select b.lot from bid b where b.auction_id = and b.person_id = order by b.price limit 1) as last_lot,auction_status( > 0 AS current, a.lot, a.person_id, next_price(, seller.mail AS seller_mail, buyer.mail AS buyer_mail, seller.locale AS seller_locale, buyer.login AS buyer_login, num_bid(, seller.login AS seller_login, AS auction_type FROM auction* a, person seller, person buyer, auction_type t WHERE = 84 AND = a.person_id AND COALESCE(a.type,1) = AND = 2;

ERROR:  parser: parse error at or near "order"

Aren't ORDER BY clauses allowed in subselects?

Louis-David Mitterrand - ldm(at)apartia(dot)org -

               Black holes are where God divided by zero.


pgsql-sql by date

Next:From: Louis-David MitterrandDate: 2000-09-20 13:25:52
Subject: ERROR: replace_vars_with_subplan_refs (!?)
Previous:From: Louis-David MitterrandDate: 2000-09-20 06:44:26
Subject: Re: sum of agreggates in one SELECT?

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