Re: parser: parse error at or near "-"

From: "zy7111" <zy7111(at)mail(dot)china(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: parser: parse error at or near "-"
Date: 2003-08-12 03:59:46
Message-ID: Op969187884053.23369@webmail5
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I am sorry wasting your time. I made a mistake in my program. I saw the query in the database log: select * from teleRateTable ORDER BY char_length(prefix), prefix LIMIT 16 OFFSET -16. Where -16 is the fail reason.

>
> hi,
>
> I am developing an accounting application using postgresql
> 7.2.2 and pg72jdbc2.jar. I met following exception when execute a query:
>
> java.sql.SQLException: ????: parser: parse error at or
> near "-"
>
> at
> org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:94)
> at
> org.postgresql.Connection.ExecSQL(Connection.java:398)
> at
> org.postgresql.jdbc2.Statement.execute(Statement.java:130)
> at
> org.postgresql.jdbc2.Statement.executeQuery(Statement.java:54)
> at
> org.postgresql.jdbc2.PreparedStatement.executeQuery(PreparedStatement.java:99)
> at
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:179)
> at
> db.TeleRateTable.selectAll(TeleRateTable.java:36)
> at
> org.apache.jsp.admin_jsp._jspService(admin_jsp.java:737)
> ......
>
> the sql string is:
> select * from teleRateTable ORDER BY
> char_length(prefix), prefix LIMIT ? OFFSET ?
>
> Any hint on solving this problem is
> appreciated.
>
> regards
> zhanyi
>
----------------------------------------------------------------------

http://paymail.china.com
http://mail.china.com

Browse pgsql-jdbc by date

  From Date Subject
Next Message Evan Tsue 2003-08-12 05:38:11 Character Decoding Problems
Previous Message Nick Fankhauser 2003-08-12 03:56:55 Re: parser: parse error at or near "-"