Received: from starbucks.iplus.net.tw (starbucks.iplus.net.tw [202.145.136.78]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA83634 for ; Wed, 24 May 2000 11:14:13 -0400 (EDT) (envelope-from mikema@ficnet.net) Received: from ficnet.net (IDENT:michael@as20po46.ht.ficnet.net.tw [210.243.73.46]) by starbucks.iplus.net.tw (8.9.3/8.9.3) with ESMTP id XAA00364 for ; Wed, 24 May 2000 23:14:02 +0800 (CST) Message-ID: <392BF383.689FB14B@ficnet.net> Date: Wed, 24 May 2000 23:21:39 +0800 From: Michael Ma X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-6.1.1 i586) X-Accept-Language: zh-TW, en, zh-CN MIME-Version: 1.0 To: pgsql-sql Subject: Unable to identify a right operator '>=' for type 'bpchar' Content-Type: text/plain; charset=big5 Content-Transfer-Encoding: 7bit X-Archive-Number: 200005/117 Hi, While running the following SQL statement in postgresql-7.0-1 via JDBC, select a.cus_code, a.dlv_code, b.cus_abbr, a.dlv_abbr, a.address, a.tel, a.fax, a.contact from dlv_point a, customer b where ((a.cus_code >= ? and a.cus_code <= ?) or (b.cus_abbr >= ? and b.cus_abbr <= ?)) and trim(b.cus_code) = trim(a.cus_code) order by 1 ; I got the following error message: Unable to identify a right operator '>=' for type 'bpchar' You may meed to add parentheses or an explicit cast. I have never got this kind of message from Informix or Oracle. The data type of the fields in the above statement are all char(n). Can anyone help? The system I am using is Red Hat Linux 6.2 with Kernel 2.2.14-6.1.1 on an i586 Thanks in advance. Michael