How do I get x number of rows in a select statement after ordering and grouping?
I have the next select statement:
SELECT * FROM SALES ORDER BY CREATION_DATE
This statement give me many rows, but I only need de first 20 rows, or only I need the rows 20 to 40, or only I need the last 20 rows, it depends.
Are there any form to handle it?
There is a two part workaround:
- MaxDB uses server side cursors, so if you stop reading records after x rows, there isn't a great cost associated
- most programming interfaces allow you to position to a specific record. And if you give a negative index to these methods, the position from the end of the result set is used. By positioning to row -20, you would read the last 20 rows.
Daniel Dittmar
-- Daniel Dittmar SAP Labs Berlin [EMAIL PROTECTED]
-- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
