Forum Stats

  • 3,838,748 Users
  • 2,262,397 Discussions
  • 7,900,749 Comments

Discussions

ORA-00907: Missing right parenthesis

2620288
2620288 Member Posts: 2
edited Feb 15, 2016 1:04PM in SQLとPL/SQL

Hi Experts ,

select * from v$sql where sql_id in (

SELECT   maxqueryid

    FROM v$undostat

   WHERE ROWNUM < 20

ORDER BY undoblks DESC );

I have read that Order by clause in not allowed  " in () " condition so how can I alter this query without changing my logic. Order by descending order is important for the query if I remove that itself then I won't get desired output. Please help.

Answers

This discussion has been closed.