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 -> problem with 'create table xxx as <query>' with order by clause

problem with 'create table xxx as <query>' with order by clause

From: Paul Wagner <wagner_at_tera.cs.umn.edu>
Date: 23 Jul 1999 20:41:36 GMT
Message-ID: <7nak20$e67$1@news1.tc.umn.edu>


Working with Oracle 7.3.2. I just noticed that 'create table temp as select field from table order by field' does not work - generates an 'SQL command ended improperly' error. Of course, the plain 'select field from table order by field' works fine, as does the above create table statement if you remove the order by clause.

I found one workaround - 'create table temp as select field from table group by field', as Oracle orders the groups in ascending order, which is what I want now. This won't work for descending order, though. Anyone know of a workaround that allows me to use "order by" in a "create table" statement?

Thanks,

Paul

--
* * * * * * * * * * * * * * * *

Received on Fri Jul 23 1999 - 15:41:36 CDT

Original text of this message

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