Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 38897 invoked from network); 4 Oct 2003 04:37:19 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 4 Oct 2003 04:37:19 -0000 Received: (qmail 40131 invoked by uid 500); 4 Oct 2003 04:36:56 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 40122 invoked by uid 500); 4 Oct 2003 04:36:56 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 39996 invoked from network); 4 Oct 2003 04:36:54 -0000 Received: from unknown (HELO dns10.mail.yahoo.co.jp) (210.81.151.143) by daedalus.apache.org with SMTP; 4 Oct 2003 04:36:54 -0000 Received: from unknown (HELO ?127.0.0.1?) (218.143.90.20 with poptime) by dns10.mail.yahoo.co.jp with SMTP; 4 Oct 2003 04:37:03 -0000 X-Apparently-From: Date: Sat, 04 Oct 2003 13:34:24 +0900 From: fumi To: "Apache Torque Users List" Subject: Re: AW: Why SQL statement is not terminated correctly? In-Reply-To: <94A74941C5F70B4BA810C5E04F4A2B363A0E71@elkdc01.office.elkware.com> References: <94A74941C5F70B4BA810C5E04F4A2B363A0E71@elkdc01.office.elkware.com> Message-Id: <20031004125546.19E1.FMHK1968@ybb.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.05.06 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Vitali, Thanx(Arigatou) for your reply. Sorry for my slow reply & my poor english. "Usselmann, Vitali" wrote: > I can not tell you the difference between your code fragments. > I solved my problems with Criteria.or() by using the Criterion > object instead of Criteria.or() as shown at the bottom of: > http://db.apache.org/torque/peers-howto.html I tried to solve this problem using Criterion as you mentioned. But i couldn't... ----------------------------------------- Criteria crit = new Criteria(); Criteria.Criterion cond1 = crit.getNewCriterion(EmpPeer.JOB, (Object)"Engineer", Criteria.EQUAL); Criteria.Criterion cond2 = crit.getNewCriterion(EmpPeer.HIREDATE, Calendar.getInstance().getTime(), Criteria.LESS_THAN); crit.add(cond1.or(cond2)); EmpPeer.doDelete(crit); (*1) EmpPeer.doSelect(crit); (*2) ------------------------------------------ whereClause for (*1) was JOB='Engineer', and for (*2) was (EMP.JOB='Engineer' OR EMP.HIREDATE