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: Create view with Order By

Re: Create view with Order By

From: Kenton Ho <kjho_at_engmail.uwaterloo.ca>
Date: Tue, 13 Apr 1999 14:24:36 -0400
Message-ID: <7f02bj$ko2$1@news.interlog.com>


Couldn't you:

select * from view_you_made order by column_you_want ?

That would be ordered then at the point of select...

Kenton Ho
Perfit Computer Systems Group Inc.

Chris Hamilton <ToneCzar_at_erols.com> wrote in message news:37136d1f.16853113_at_news.erols.com...
> On Tue, 13 Apr 1999 22:59:39 +0800, Neil Moseley <mose_at_iinet.net.au>
> wrote:
>
> >G'day all,
> >
> >This statement works fine:
> >SELECT * FROM MYTABLE ORDER BY MYCOLUMN;
> >But this does not:
> >CREATE VIEW TEMP AS SELECT * FROM MYTABLE ORDER BY MYCOLUMN;
> >
> >If ORDER BY cannot be used when creating a view, is there a solution.
>
> You have to order-by dynamically at run time.
>
> create view temp as select * from mytable;
>
> select * from temp order by mycolumn;
>
> Views do not store the data, nor the sort order - just the query.
>
> Chris
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Christopher Hamilton
> Oracle DBA -- Wall Street Sports
> chris_at_wallstreetsports.com
> http://www.wallstreetsports.com/
Received on Tue Apr 13 1999 - 13:24:36 CDT

Original text of this message

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