Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 73604 invoked from network); 11 Jul 2000 15:25:44 -0000 Received: from dns.novient.com (HELO gate.infowavetech.com) (207.238.78.194) by locus.apache.org with SMTP; 11 Jul 2000 15:25:44 -0000 Received: from [172.16.51.227] by gate.infowavetech.com for tomcat-user@jakarta.apache.org id LAA00840; Tue Jul 11 11:23:05 2000 Message-ID: <396B3BCA.1DAE6DBF@vei.net> Date: Tue, 11 Jul 2000 11:22:50 -0400 Organization: Novient X-Mailer: Mozilla 4.73 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 Subject: Re: I am really stumped at this one any1? References: <20000711020758.98817.qmail@hotmail.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: tomcat-user@jakarta.apache.org From: "Edward W. Rouse" have you run the inner select by itself to see if it gives you the response you expect? Have you placed that info inside the ALL() to see if you get the response you expect? Have you tried it without the where clause at all, to see if you get what you expect? bottom line, with a complex SQL statement, break it up and try individual sections. This will speed up your problem resolution. Ed. Darren Lee Deliang wrote: > hi, > > yeah it works without the single quotes. thanks every1. I got another > bug that sprang out. I suspect it is my sql statement's logic. check this > out: > > String SQLstatement = "SELECT courseNo FROM Course WHERE courseNo != > ALL(SELECT courseNo FROM ApplicationRecord WHERE userNRIC = '" + userNRIC + > "' ) GROUP BY courseNo HAVING courseDeadline > ? AND courseCapacity > 0 "; > > The ? is later set in with an Timestamp object i created later on and works > fine. The problem I have is that my program does not do wat i want it to do. > I want it to display courses which the current user HAS NOT booked for > before. Records of bookings are kept in ApplicationRecord and all the > courses are kept in Courses. Can anyone tell me what is wrong with my > statement? >