Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    2

    Unanswered: ORA-00907 problem

    I want to limit query results in order to paging them, so i use this query on table t:

    select *
    from ( select inner.*, rownum rn
    from ( select *
    from t where t.object_id='123'
    order by t.TIMESTAMP
    ) inner
    )
    where rn between 1 and 30

    Oracle return error "ORA-00907: mising right parenthesis" right before "ORDER" statement ?

    what happened ? is there something wrong ?

    please help me

    Thanks

  2. #2
    Join Date
    Mar 2004
    Location
    Sydney
    Posts
    20
    Your sql looks fine and executes fine for me. I can however reproduce your error by inserting a ';' before the order by clause as follows:
    Code:
    select *
    from 
      ( select inner.*, rownum rn
        from 
        ( select *
          from t where t.object_id='123'; 
          order by t.TIMESTAMP
        ) inner
      )
    where rn between 1 and 30
    Are you sure there is no stay character in your statement.

    Alternatively what query tool are you using? Is it possible that the query tool is changing the syntax before submitting the query?

    What version of Oracle?

  3. #3
    Join Date
    Mar 2004
    Posts
    2

    ORA-00907 problem

    Thanks for replying me quickly !

    I used that query with TOAD 7.5.2 (Oracle client 8.1.7)
    Oracle DB version is 8.0.6
    I also received the same error when I used that query with php running in the same machine with TOAD and Oracle client above
    Moreover, if I remove that ORDER statement, it works but meaningless to me

    Any comment ?
    Last edited by rafe; 03-16-04 at 04:06.

Posting Permissions

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