DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: views & order by

  1. #1
    Join Date
    Nov 2000
    Posts
    198

    Angry

    I am trying to create a view using a select statment
    which has order by clause. I keep getting this message
    ORA-00933: SQL command not properly ended.
    if I take out order by from the select it works fine.
    Any Idea on how to do create views with order by??
    thanks in advance

  2. #2
    Join Date
    Sep 2000
    Posts
    384
    No in views you can give order by
    Radhakrishnan.M

  3. #3
    Join Date
    Nov 2000
    Posts
    198
    here is the statment I am using

    SQL> ed
    Wrote file afiedt.buf

    1 create or replace view test_v as
    2 select obl_num from obl
    3* order by obl_num
    SQL> /
    order by obl_num
    *
    ERROR at line 3:
    ORA-00933: SQL command not properly ended

    [Edited by ocpdude on 11-08-2000 at 02:09 PM]

  4. #4
    Join Date
    Sep 2000
    Posts
    17
    While u r editing , make sure that the script ends with /
    i.e in ur edit file
    it should be like

    create or replace view test_v as
    select obl_num from obl
    order by obl_num
    /


    Hope it helps..

  5. #5
    Join Date
    Oct 2000
    Posts
    3
    You cannot create view with order by clause. Oracle does not support this.

  6. #6
    Join Date
    Jul 2000
    Posts
    296
    Oracel supports order by in views in Oracle 8i.

  7. #7
    Join Date
    Sep 2000
    Posts
    384
    Thanks !

    yes it works in 8i .I just tried it...
    Radhakrishnan.M

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width