JustinX Posted October 3, 2006 Share Posted October 3, 2006 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. Thanks. JustinX Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted October 3, 2006 Share Posted October 3, 2006 Suggestions: - Fill a temporary table and run the report against it. - Use a custom datasource - Use a store procedure and cast the result to a tableselect a, b, cfrom table(cast( MY_PACKAGE.MY_STORE( $P{PARAM}) )the store procedure should return a type TABLE - Create your own QueryExecuter - .... GiulioPost edited by: giulio, at: 2006/10/03 15:41 Link to comment Share on other sites More sharing options...
JustinX Posted October 4, 2006 Author Share Posted October 4, 2006 Hi giulio, Thanks for your helpful suggesion. Would you please give me more details on how to use a custom datasource, and create your own QueryExecuter? Thanks, JustinX Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now