The query without the second "order by" functions ok (check
http://troels.arvin.dk/db/rdbms/ ) :
select * from (
select rownumber() over(order by aplicacion0_.APLNOMBRE) as row_,
aplicacion0_.APL_ID as APL_ID, aplicacion0_.APLNOMBRE as APLNOMBRE,
aplicacion0_.DESC_APL as DESC_APL from APLICACION aplicacion0_ ) as temp_
where row_ between 1 and 2
this query does not function :
select * from (
select
aplicacion0_.APL_ID as APL_ID,
aplicacion0_.APLNOMBRE as APLNOMBRE,
aplicacion0_.DESC_APL as DESC_APL
from APLICACION aplicacion0_
order by aplicacion0_.APLNOMBRE )
as temp_
Error: SQL0104N An unexpected token "order" was found following "ICACION aplicacion0_".
Expected tokens may include: "GROUP". SQLSTATE=42601
(State:42601, Native Code: FFFFFF98)
may be is something (bug) with an inner query with "order by" .
bye