Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 10598 invoked from network); 8 Feb 2010 15:37:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Feb 2010 15:37:59 -0000 Received: (qmail 34905 invoked by uid 500); 8 Feb 2010 15:37:59 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 34879 invoked by uid 500); 8 Feb 2010 15:37:59 -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 34871 invoked by uid 99); 8 Feb 2010 15:37:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 15:37:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 15:37:49 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id F38EA234C052 for ; Mon, 8 Feb 2010 07:37:27 -0800 (PST) Message-ID: <1468559287.122491265643447996.JavaMail.jira@brutus.apache.org> Date: Mon, 8 Feb 2010 15:37:27 +0000 (UTC) From: "Kristian Waagan (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Closed: (DERBY-4541) precompile statement with result offset and fetch first clauses In-Reply-To: <602745816.122271265642728124.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4541?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Kristian Waagan closed DERBY-4541. ---------------------------------- Resolution: Duplicate Fix Version/s: 10.6.0.0 Closed and marked as duplicate of DERBY-4208. > precompile statement with result offset and fetch first clauses > --------------------------------------------------------------- > > Key: DERBY-4541 > URL: https://issues.apache.org/jira/browse/DERBY-4541 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.5.3.0 > Environment: ------------------ Java Information ----------------= -- > Java Version: 1.6.0_17 > Java Vendor: Sun Microsystems Inc. > Java home: C:\Archivos de programa\Java\jdk1.6.0_17\jre > Java classpath: D:\Programming\apache-tomcat-6.0.18\lib\servlet-api.jar;= D:\Programming\apache-tomcat-6.0.18\lib\jasper.jar;D:\Programming\apache-to= mcat-6.0.18\lib\jsp-api.jar;D:\Programming\apache-tomcat-6.0.18\lib\el-api.= jar;D:\Programming\apache-tomcat-6.0.18\lib\annotations-api.jar;D:\Programm= ing\workspace_eclipse\prototype_24\work;D:\Programming\workspace_eclipse\pr= ototype_24\WEB-INF\classes;D:\Programming\workspace_eclipse\prototype_24\WE= B-INF\lib\activation.jar;D:\Programming\workspace_eclipse\prototype_24\WEB-= INF\lib\commons-fileupload-1.2.1.jar;D:\Programming\workspace_eclipse\proto= type_24\WEB-INF\lib\freemarker-2.3.8.jar;D:\Programming\workspace_eclipse\p= rototype_24\WEB-INF\lib\jakarta-oro-2.0.8.jar;D:\Programming\workspace_ecli= pse\prototype_24\WEB-INF\lib\mime-util.jar;D:\Programming\workspace_eclipse= \prototype_24\WEB-INF\lib\postgresql-8.3-603.jdbc3.jar;D:\Programming\works= pace_eclipse\prototype_24\WEB-INF\lib\standard.jar;D:\Programming\workspace= _eclipse\prototype_24\WEB-INF\lib\derby.jar;D:\Programming\workspace_eclips= e\prototype_24\WEB-INF\lib\log4j-1.2.15.jar;D:\Programming\workspace_eclips= e\prototype_24\WEB-INF\lib\commons-io-1.4.jar;D:\Programming\workspace_ecli= pse\prototype_24\WEB-INF\lib\jim-lib.jar;D:\Programming\workspace_eclipse\p= rototype_24\WEB-INF\lib\commons-lang-2.4.jar;D:\Programming\workspace_eclip= se\prototype_24\WEB-INF\lib\json-lib-2.3-jdk15.jar;D:\Programming\workspace= _eclipse\prototype_24\WEB-INF\lib\jstl.jar;D:\Programming\workspace_eclipse= \prototype_24\WEB-INF\lib\web4j.jar;D:\Programming\workspace_eclipse\protot= ype_24\WEB-INF\lib\derbytools.jar;D:\Programming\workspace_eclipse\prototyp= e_24\WEB-INF\lib\derbyrun.jar > OS name: Windows XP > OS architecture: x86 > OS version: 5.1 > java.specification.name: Java Platform API Specification > java.specification.version: 1.6 > --------- Derby Information -------- > JRE - JDBC: Java SE 6 - JDBC 4.0 > [D:\Programming\workspace_eclipse\prototype_24\WEB-INF\lib\derby.jar] 10.= 5.3.0 - (802917) > [D:\Programming\workspace_eclipse\prototype_24\WEB-INF\lib\derbytools.jar= ] 10.5.3.0 - (802917) > ------------------------------------------------------ > ----------------- Locale Information ----------------- > ------------------------------------------------------ > Reporter: burk mayer > Fix For: 10.6.0.0 > > > hi, > i'm getting an error while precompiling a prepared statement with offset = and fetch first clauses. > the documentation (http://db.apache.org/derby/docs/dev/ref/rrefsqljoffset= fetch.html#rrefsqljoffsetfetch), provides following example: > SELECT * FROM T ORDER BY I OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY > the prepared statement looks like:=20 > Connection con =3D datasource.getConnection(); > PreparedStatement p =3D con.prepareStatement("SELECT * FROM T ORDER BY I = OFFSET ? ROWS FETCH NEXT ? ROWS ONLY"); > but an SQLException is thrown: Syntax error: Encountered "?" at line 1, c= olumn 60. > i'm using following version of derby: > Bundle-Name: Apache Derby 10.5 > Bundle-Version: 10.5.3000000.802917 > the connection is created from a container-managed connection-pool dataso= urce: > name=3D"jdbc/prototype" > auth=3D"Container" > type=3D"javax.sql.DataSource" > driverClassName=3D"org.apache.derby.jdbc.EmbeddedDriver" > url=3D"jdbc:derby:memory:prototype;create=3Dtrue" > username=3D"" > password=3D"" > maxActive=3D"10" > maxIdle=3D"5" > maxWait=3D"10000" > /> > thank you for your support, > burk --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.