Numeric Comparions in EXPRESSION Statements

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Wed Oct 18 20:54:45 EDT 2006


Did you try:

EXPRESSION ([STATIONS] >= 2 AND [STATIONS] <= 10)

-Steve W

James Card wrote:
> I've got a CLASS that fails (no features are drawn) when given an 
> expression like this:
>   EXPRESSION ('[STATIONS]' >= '2' AND '[STATIONS]' <= '10')
> 
> All works as expected if the expression is changed to:
>   EXPRESSION ('[STATIONS]' >= '10' AND '[STATIONS]' <= '20')
> 
> It seems that the comparison is treating all values as strings. If I 
> remove the quotes trying to treat the values as numeric I get no matches 
> at all. I've tried wrapping each term in the expression into its own set 
> of parentheses to force it to be evaluated separately. I've read all the 
> docs that seemed pertinent and searched the list archives -- I'm just 
> not seeing what I need anywhere.
> 
> --James Card  --  http://home.inreach.com/jdcard/



More information about the mapserver-users mailing list