db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From caxo <c...@imperiaonline.org>
Subject Problem with derby 10.4
Date Mon, 14 Apr 2008 09:39:06 GMT
Hello,

I try use Derby 10.4
And have used the ROW_NUMBER function to limit the result

I used as in manual 

SELECT * FROM (
SELECT
ROW_NUMBER() OVER () AS R,
T.*
FROM T
) AS TR
WHERE R <= 10;

Modified to my need.

I have to take a certain number of rows ordered by a field.
And the derby say me error: Syntax error: Encountered "ORDER"

SELECT * FROM (
   SELECT ROW_NUMBER() OVER () AS R,
    playerId, 
    playerName, 
    points 
   FROM ranks 
   ORDER BY points DESC
   )
 AS TR WHERE R <= 10

This is my query and I'm not shure is it a bug or I'm not doing something
right.
Please can you help me?
thanks in front


Mime
View raw message