From derby-user-return-9056-apmail-db-derby-user-archive=db.apache.org@db.apache.org Mon Apr 14 17:44:14 2008 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 88098 invoked from network); 14 Apr 2008 17:44:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Apr 2008 17:44:14 -0000 Received: (qmail 84601 invoked by uid 500); 14 Apr 2008 17:44:13 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 84587 invoked by uid 500); 14 Apr 2008 17:44:13 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Delivered-To: moderator for derby-user@db.apache.org Received: (qmail 56126 invoked by uid 99); 14 Apr 2008 09:39:38 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) MIME-Version: 1.0 Date: Mon, 14 Apr 2008 12:39:06 +0300 From: caxo To: derby-user@db.apache.org Subject: Problem with derby 10.4 Message-ID: <6d02bbccf27d3cc372dded82752dec22@imperiaonline.org> X-Sender: caxo@imperiaonline.org User-Agent: RoundCube Webmail/0.1-rc1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at imperiaonline.org X-Virus-Checked: Checked by ClamAV on apache.org 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