tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward W. Rouse" <>
Subject Re: I am really stumped at this one any1?
Date Tue, 11 Jul 2000 15:22:50 GMT
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.


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?


View raw message