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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Question on 'order by'

Re: Question on 'order by'

From: Yong <yk-park_at_fkl.fujitsu.co.kr>
Date: Fri, 18 Aug 2000 09:56:52 +0900
Message-ID: <8ni1jq$53b$1@news.nuri.net>

yes, you have got an answer already.

you can't use order by in the statement of creating of view.

but you can use "order by" when using that view.

 select ***
   from emp list
   order by @@@ ;

  Scott Purkerson <purkers_at_digitalme.com> ( ) Ʒ  ޽ news:399C7129.D09897E_at_digitalme.com  Խ Ͽ ϴ .
  I've just started learning sql on oracle and I can't figure out why the following Create View won't work:     

    Create View emp list As

      Select c.name, e.salary 
      From Company c, Employees e 
      Where c.id = e.id 
      Order By c.name

    With Read Only;
[ORA-00933: SQL command not properly ended]
  I've tried a couple variations:     

    Create View emp list As (

      Select c.name, e.salary 
      From Company c, Employees e 
      Where c.id = e.id 
      Order By c.name 
      )

    With Read Only;
[ERROR "ORA-00907: missing right parenthesis"]
  and
    Create View emp list As (
      Select c.name, e.salary 
      From Company c, Employees e 
      Where c.id = e.id 
      Order By c.name );

    With Read Only;
[SP2-0734: unknown command beginning "With Read ..." - rest of line
ignored.]
  It looks like the "order by" clause doesn't work inside a subquery?   Any help is appreciated!

  tia-
  Scott     

--
Received on Thu Aug 17 2000 - 19:56:52 CDT

Original text of this message

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