Whenever I use Clauses such as FETCH/ORDER BY within a Sub-Query or In-line View, I get the message something similar to this:
-199. The use of Reserve word 'ORDER' following "" is not valid.
But when I execute the sub-query alone, it works perfectly fine.
For Ex. when I need the last 10 maximum values of a column to be joined with another table, I would ORDER the records in Descending and would fetch the first 10 rows within the sub-query to get my desired set of records. But this won't work.
I know there are methods available for my requirement. But I am curious to know why this method doesn't work though the sub-query independantly works.