Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

display only 2 rows from a recordset size of 10

 
JayaSiji Gopal
Ranch Hand
Posts: 303
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a requirement like this:
I have a holiday definiton table and a holiday dates table.

For a given holiday definition, there can be multiple holiday dates. so, based on the seq no, i get to get all the holiday definitons and all the dates for each holiday definition.

From this recordset, i need to fetch the holiday dates, get the biggest of those dates and display only 1 row for each holiday definition on the view with the largest date. How do I manipulate the resultset?

Any help!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The best way to to only fetch the records you want in the first pace. You may be able to do this with a simple where clause. If not, some database systems allow you to limit the returned data to a "slice" of the results. For example, PostgreSQL has the LIMIT and OFFSET keywords to do this.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic