Hi Shawn, all!
[EMAIL PROTECTED] wrote:
Joerg Bruehe <[EMAIL PROTECTED]> wrote on 08/05/2005 02:08:35 PM:
[[...]]
Have you considered using BETWEEN?
[[...]]
Actually, no, he cannot substitute BETWEEN as BETWEEN is _inclusive_ of
the boundary conditions (a closed interval). In this case he does not
wasnt values equal to his boundaries (an open interval)
WHERE X BETWEEN A and B
Is equivalent to
WHERE X>=A and X<=B
His original WHERE clause was comparing X>A and X<B (no equality). The two
are close but not the same.
Shame on me that I missed that - sorry! Good that you spotted it.
(I know "between" is inclusive, I just did not check the comparison
operators used.)
Still, I would consider to replace
X > A AND X < B
by
X BETWEEN (A+1) AND (B-1)
for the reasons I gave in my original post (provided we talk about
integral values).
Regards,
Jörg
--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com
Office: (+49 30) 417 01 487
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]