Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Help: SELECT FROM (subquery) ? Is it possible?

Re: Help: SELECT FROM (subquery) ? Is it possible?

From: s. hunter <sarahxhunter_at_NOSPAMTHANX.hotmail.com>
Date: Thu, 20 Jan 2000 12:38:38 +0100
Message-ID: <3886F3BE.5D91C2B7@NOSPAMTHANX.hotmail.com>


Peder,

Have a look at the responses to "Order by clause in subquery" from Tuesday (comp.databases.oracle.server thread started by Shaojie Hu). I think the consensus is "you can't do it unless you have Oracle 8i"..

/Sarah

Peder wrote:

> Hey,
>
> I have a problem concerning subqueries and ORDER BY. I have a query
> which select a number of records and then does some ordering of them (using
> CONNECT BY). However, I want to ORDER the table the SELECT operates on, like
> this:
>
> SELECT *
> FROM (SELECT * FROM sometable ORDER BY something)
> WHERE ...
> < connect by stuff >
>
> instead of
>
> SELECT *
> FROM sometable
> WHERE ....
> < connect by stuff >
>
> However, this doesn't seem to work. Why? Is there a way to do this. The
> problem I have that I can't order after the CONNECT BY, as this screws up
> the nice tree-like structure the CONNECT BY made.
>
> Thanks in advance,
> - Peder
Received on Thu Jan 20 2000 - 05:38:38 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US