Nevermind.  Its because my fields are CHAR and not INTEGER.  Can't compare
on a CHAR.  So I have to do a CONVERT(int,total_undergrad_enrollment) to get
the right results.

Sorry to bother everyone.


Charlie



Charles N. Harvey III wrote:


The only difference in these two queries is the single quote around the number
in the WHERE clause. The first one returns over 900 results and the second one
returns only 1. Why such a difference? I clearly want to be using the second
query, but OJB adds the single quote around WHERE parameters. Should it be doing
that? Usually it should. Is there any way to turn it off on a per-query basis?



SELECT COUNT( A0.total_undergrad_enrollment )
FROM UNDERGRAD_PROFILE A0
WHERE ( A0.total_undergrad_enrollment > 1 ) AND A0.total_undergrad_enrollment < 1000



SELECT COUNT( A0.total_undergrad_enrollment )
FROM UNDERGRAD_PROFILE A0
WHERE ( A0.total_undergrad_enrollment > '1' ) AND A0.total_undergrad_enrollment < '1000'



Thanks a lot.



Charlie




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to