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:47:30 +0800
Message-ID: <385B7452.442C@yahoo.com>


peter wrote:
>
> I may stupid, but why do you need create a table and insert data into it in
> a ordered fashion?
> TurkBear wrote in message <385966e7.28264692_at_super.news-ituk.to>...
> >
> >Sorry, but I did test it..
> >
> >I have a table with randomly ordered name in it;see output of select
> empl_nm
> >from test_table( sample only):
> >EMPL_NM
> >------------------------
> >Weidemann,Patrick J
> >Welfling,Mary B
> >Zeller,Matthew J
> >Zochert,Sidney A
> >Zwart,Benjamin J.
> >Brady,Levi L
> >Buckley,Elizabeth A
> >Ellis,Glen C
> >Hall,David A.
> >Joyce,Christina M
> >Mackereth,Anne H
> >Mitchell,Patrick D
> >Ruiz,Maxine M
> >Scarrow,Richard F
> >Tinklenberg,Elwyn G
> >Weingartz,James F
> >
> >
> >I then issued the following:
> >create table junk as select empl_nm from test_table order by empl_nm.
> >A select from that table ( select empl_nm from junk) returns:[ again a
> sample,
> >but look where Buckley is now located ]
> >EMPL_NM
> >-------------------------
> >Basney,Todd J
> >Behm,Thomas L
> >Blomquist,Marie Anne
> >Bloomgren,Keith E
> >Borriello,Trudie A
> >Bottolfson,Julie A
> >Bowdish Jr.,Boyd W
> >Brady,Levi L
> >Braunig,Richard E
> >Bronder,Jacob Z.
> >Bruggeman,Gary E.
> >Buckley,Elizabeth A
> >Busch,Robert S
> >Cain,Brendan J
> >Carlson,Mark D
> >Chernyaev,Alex V
> >Curry,DeLorah F
> >Czichray,Stephan E.
> >Ehrenstrom,Kent N.
> >Elftmann,Jonathan D
> >Ellis,Glen C
> >Engstrom,Glenn M
> >Erickson,Ronald B
> >Evbayekha,Robert E
> >Evens,Eric C
> >Fashant,Donald L
> >Forster,Ryan T
> >Fredrickson,Derek D.
> >Gale,Robert A
> >Green,Evan R
> >Groehler,James D
> >Hagen,Mark G
> >Hall,David A.
> >Halvorson,James P
> >Hamre,Herman G
> >Harper,Thomas W
> >
> >So, I did get the results I posted....why it failed when you tried I don't
> know
> >
> >
> >John Greco
> >Oracle 7.3.4
> >Also tried it on 8.1.5
> >
> >
> >"Sheila Zou" <xzou_at_graphnet.com> wrote:
> >
> >>please make sure before you answer the question. it doesnot work I think.
> >>
> >>TurkBear <johng_at_mm.com> wrote in message
> >>news:38596030.26545460_at_super.news-ituk.to...
> >>>
> >>> Eliminate the parens... just use
> >>>
> >>> create table junk as select * from other_table order by
> >>field_in_other_table;
> >>>
> >>> It should work...
> >>> You cannot, as in your example, create a table by selecting from a table
> >>with
> >>> the same name .....I assume a typo....
> >>>
> >>>
> >>>
> >>>
> >>> "Russell Sturm" <polaristech_at_earthlink.net> 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
> >>> >
> >>> >
> >>>
> >>>
> >>>
> >>> -----------== Posted via Newsfeeds.Com, Uncensored Usenet News
> >>==----------
> >>> http://www.newsfeeds.com The Largest Usenet Servers in the
> World!
> >>> ------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers
> >>==-----
> >>
> >
> >
> >
> > -----------== Posted via Newsfeeds.Com, Uncensored Usenet News
> ==----------
> > http://www.newsfeeds.com The Largest Usenet Servers in the World!
> >------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers
> ==-----

Its a very effective way of having packed blocks, giving better hit ratios - sort of pseudo-manual-cluster...and yes, that is a term I have just invented :-)
--



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:47:30 CST

Original text of this message

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