From derby-dev-return-119277-archive-asf-public=cust-asf.ponee.io@db.apache.org Wed Oct 17 15:54:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 0FAF8180679 for ; Wed, 17 Oct 2018 15:54:04 +0200 (CEST) Received: (qmail 20777 invoked by uid 500); 17 Oct 2018 13:54:04 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 20618 invoked by uid 99); 17 Oct 2018 13:54:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2018 13:54:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 6B318C8617 for ; Wed, 17 Oct 2018 13:54:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id qKa7seOEPKRD for ; Wed, 17 Oct 2018 13:54:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id B15F55F432 for ; Wed, 17 Oct 2018 13:54:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id B5216E2637 for ; Wed, 17 Oct 2018 13:54:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1D9C221259 for ; Wed, 17 Oct 2018 13:54:01 +0000 (UTC) Date: Wed, 17 Oct 2018 13:54:01 +0000 (UTC) From: "Rick Hillegas (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DERBY-7013) ROW_NUMBER() OVER () no me funciona MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-7013?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1665= 3582#comment-16653582 ]=20 Rick Hillegas commented on DERBY-7013: -------------------------------------- The query works for me with Derby version 10.4.1.3 using Derby's ij tool. T= he following script runs without any errors: {noformat} connect 'jdbc:derby:db;create=3Dtrue'; create table t1(a int); insert into t1 values (1); select * from t1; SELECT * FROM ( SELECT ROW_NUMBER() OVER () AS R, T.* FROM "APP"."T1" AS T ) AS TR WHERE R <=3D 10; {noformat} Maybe this is a Squirrel issue? Here is my response run through Google translate: La consulta me funciona con Derby versi=C3=B3n 10.4.1.3 utilizando la herra= mienta ij de Derby. La siguiente secuencia de comandos se ejecuta sin error= es: Tal vez esto es un problema de Squirrel? > ROW_NUMBER() OVER () no me funciona > ----------------------------------- > > Key: DERBY-7013 > URL: https://issues.apache.org/jira/browse/DERBY-7013 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.4.1.3 > Environment: Squirrel 3.8.1 y DerbyDriver 10.4.1.3 > Reporter: Aitor T T > Priority: Blocker > > Mi consulta es muy clara, soy totalmente incapaz de ejecutar esto en mi S= QUIRREL ver. 3.8.1 con driver para Derby ver. 10.4.1.3, tengo entendido que= a partir de esta versi=C3=B3n ya se pod=C3=ADa ejecutar sin problemas. > Mi query es esta: > _SELECT * FROM (_ > =C2=A0=C2=A0 _SELECT_=20 > =C2=A0=C2=A0=C2=A0=C2=A0 _ROW_NUMBER() OVER () AS R,_=20 > =C2=A0=C2=A0=C2=A0=C2=A0 _T.*_=20 > =C2=A0=C2=A0 _FROM "MOSQL"."SSAA_CAIDAS_MAQUINAS" AS T_ > _) AS TR_=20 > =C2=A0=C2=A0 _WHERE R <=3D 10;_ > Y el error devuelto es este: > {color:#FF0000}Error: Error de sintaxis: Encountered "(" at line 3, colum= n 24.{color} > {color:#FF0000}SQLState:=C2=A0 42X01{color} > {color:#FF0000}ErrorCode: -1{color} > Estoy desesperado con esto, alguien que le haya pasado y me pueda ayudar.= ...??? Necesito en mi proyecto devolver las "N" primeras filas de una query= y no veo manera de hacerlo en Derby. > =C2=A0 > Gracias. > Saludos. -- This message was sent by Atlassian JIRA (v7.6.3#76005)