[ https://issues.apache.org/jira/browse/DERBY-7013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16660693#comment-16660693 ]
Rick Hillegas commented on DERBY-7013: -------------------------------------- I re-tried the experiment with 10.8.2.1 and a client driver. I booted a 10.8.2.1 server and ran the following script through ij in another window (again, using 10.8.2.1): {noformat} connect 'jdbc:derby://localhost:8246/db;create=true'; drop table t1; 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 <= 10; {noformat} The script worked for me. It produced the following output: {noformat} ij version 10.8 ij> connect 'jdbc:derby://localhost:8246/db;create=true'; ij> drop table t1; ERROR 42Y55: 'DROP TABLE' cannot be performed on 'T1' because it does not exist. ij> create table t1(a int); 0 rows inserted/updated/deleted ij> insert into t1 values (1); 1 row inserted/updated/deleted ij> select * from t1; A ----------- 1 1 row selected ij> SELECT * FROM ( SELECT ROW_NUMBER() OVER () AS R, T.* FROM "APP"."T1" AS T ) AS TR WHERE R <= 10; R |A -------------------------------- 1 |1 1 row selected {noformat} I don't use the Eclipse plugin so I can't give you advice about how to configure it. I do get the error you're seeing when I run a 10.2.2.0 server. Is it possible that you are running a very old server? What happens when you issue the following query against your server: {noformat} values syscs_util.syscs_get_database_property('DataDictionaryVersion'); {noformat} --------------- Here is my response pumped through google translate: Volví a intentar el experimento con 10.8.2.1 y un controlador de cliente. Arranqué un servidor 10.8.2.1 y ejecuté el siguiente script a través de ij en otra ventana (nuevamente, usando 10.8.2.1): ... El guión funcionó para mí. Se produjo la siguiente salida: ... No uso el complemento Eclipse, por lo que no puedo aconsejarle sobre cómo configurarlo. Recibo el error que está viendo cuando ejecuto un servidor 10.2.2.0. ¿Es posible que esté ejecutando un servidor muy antiguo? Qué sucede cuando emites la siguiente consulta en tu servidor: {noformat} values syscs_util.syscs_get_database_property('DataDictionaryVersion'); {noformat} > 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 > SQUIRREL ver. 3.8.1 con driver para Derby ver. 10.4.1.3, tengo entendido que > a partir de esta versión ya se podía ejecutar sin problemas. > Mi query es esta: > _SELECT * FROM (_ > _SELECT_ > _ROW_NUMBER() OVER () AS R,_ > _T.*_ > _FROM "MOSQL"."SSAA_CAIDAS_MAQUINAS" AS T_ > _) AS TR_ > _WHERE R <= 10;_ > Y el error devuelto es este: > {color:#FF0000}Error: Error de sintaxis: Encountered "(" at line 3, column > 24.{color} > {color:#FF0000}SQLState: 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. > > Gracias. > Saludos. -- This message was sent by Atlassian JIRA (v7.6.3#76005)