Jump to content
Changes to the Jaspersoft community edition download ×

select ordered first 100: Oracle hint


Recommended Posts

Hi Guru,


How to get the latest 100 results ordered by MyDatetime column in a very large table, i.e., we need only the the latest 100 rows among all rows in the table? I do not want to sort the huge table first and then retrieve the 100 rows.



Can I use Oracle Hint with JasperReport to get such things? I have tried with something like

/*+ first_rows index( ) */

However, looks like JasperReport does not take it, as the returned 100 results are not sorted.



Do you guys know how to do this? Or any other way as long as it helps me reach the goal.






Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic



- Fill a temporary table and run the report against it.


- Use a custom datasource


- Use a store procedure and cast the result to a table

select a, b, c

from table(cast( MY_PACKAGE.MY_STORE( $P{PARAM}) )

the store procedure should return a type TABLE


- Create your own QueryExecuter


- ....



Post edited by: giulio, at: 2006/10/03 15:41

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...