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

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

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

From: Menno <mkaper_at_hotmail.com>
Date: Fri, 21 Jan 2000 10:18:45 +0100
Message-ID: <948446313.441484@news.knoware.nl>


What you call a SUBQUERY is called an INNER VIEW.

As you migth know, is that you can't use ORDER BY in a CREATE VIEW statement.

So you probably also can't use this in an INNER VIEW statement

Of course you can still use it in your main query

Menno

> 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 Fri Jan 21 2000 - 03:18:45 CST

Original text of this message

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