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: CREATE ORDERED TABLE

Re: CREATE ORDERED TABLE

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Sat, 18 Dec 1999 19:49:16 +0800
Message-ID: <385B74BC.3A57@yahoo.com>


Serguei Siassine wrote:
>
> Try this
>
> create or replace view COMPANY_VIEW as
> select Company_ID,
> field2,
> field3,
> ......
> fieldN
> from COMPANY
> group by Company_ID,
> field2,
> field3,
> ......
> fieldN,
> RowNum;
>
> create table COMPANY_ORDERED
> as select * from COMPANY_VIEW;
>
> If you have duplicate rows, RowNum will help.
>
> Sergeui Siassine
> serg_at_canadamail.com
>
> Russell Sturm wrote:
>
> > How do you create a new table based upon the ordered results of another
> > table? In other words I was trying this --
> >
> > create table junk as (select * from junk order by field);
> >
> > but Oracle will not accept the order clause.
> >
> > Any help would be greatly appreciated.
> >
> > Thanks!
> >
> > Russ
> > info_at_visualsoft.net

Group by does not guarantee a sort and thus whilst this approach will work for many cases, it cannot be relied upon for all cases...

Search old deja news for an (amusing) discussion between a calm knowledgeable poster (T Kyte) and an aggressive ignorant poster (name unknown)...

HTH
--



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Sat Dec 18 1999 - 05:49:16 CST

Original text of this message

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