>The correct version is as follows:
>
>
>if age >= 55 and age < 65
>
>
>An expression like
age >= 55 and age < = 65 can be simplified as
between(age, 55, 65), but no equivalent simplification exists if one side uses greater-or-equal, and the other side only less-than, for instance.
>
>HTH, Hilmar.
Well, in this particular case
between(age,55,64)
would work...
In other cases, you have to know the precision of the value, you're checking.
Say, if age field would be N (5,2) it would be safe to write:
between(age,55,64.99)
If you don't know the precision, you must use < and >= notation or pick up lots of decimals... (like 64.99999999999999999) - it may not work yet...
If it's not broken, fix it until it is.
My Blog