Hi Jose,

I'm afraid there is no way to do this except filtering
your result set by throwing out records you don't
need. I ran into the same issue some time ago hoping
that Oracle style (select * from (select * from a
order by col) where rowno < 10) query would work, but
it didn't because 'order by' clause is not supported
in subqueries in MaxDB (actually they are not supposed
to by standard). Let's hope that some king of
mechanism to support limited ordered output (like:
top/limit/order-by-in-subqueries/etc.) will be
implemented sooner or later.

Regards.
Alexei.

--- Jos� R�mulo El�as Contreras
<[EMAIL PROTECTED]> wrote:
> Hi:
> 
>        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?
> 
> THANKS
> 
> 
> -- 
> MaxDB Discussion Mailing List
> For list archives: http://lists.mysql.com/maxdb
> To unsubscribe:   
>
http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 

-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to