Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Hints FIRST_ROWS and order by not working together

user575682Sep 22 2008 — edited Sep 22 2008
Hi,
We are facing an issue like we are using hint FIRST_ROWS with a query which have a order by clause, if we are giving both together
it is not working and if we remove either order by or hint it is working

SELECT /*+FIRST_ROWS*/ * FROM (SELECT MYROWS.*,
ROWNUM RN FROM (SELECT * FROM V_REPORT WHERE START_DATE > '22-SEP-04'
AND END_DATE < '22-SEP-08' AND
(GEO_ID in (select GEO_ID from loc where anc = 0))
ORDER BY
ENTITY,OPERATION,NAME
)
MYROWS)
A simliar query from other view is working fine.

Please help me on the same.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 20 2008
Added on Sep 22 2008
9 comments
693 views