Logical Expressions...

Stephen Lime steve.lime at dnr.state.mn.us
Wed Feb 9 11:14:10 EST 2000


You might have to quote the [LEVEL2] in the first example. I'm pretty sure
that strings must be quoted in logical expressions. Try:

('[LEVEL2]' eq 'WATER')

The (16 > [LUCODE] < 1) expression is malformed. Think SQL where
clauses. Instead try (([LUCODE] < 16) and ([LUCODE] > 1)) or something
similar.

Steve

Stephen Lime
Internet Applications Analyst

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> Jason Maestri <sl57k at cc.usu.edu> 02/09/00 12:02AM >>>
Hey, has anybody been able to get the logical expression stuff to work
properly?  I am trying to do the folowing:
    ([LEVEL2] eq 'WATER')
It works as a regex, or a string exp, but not as a logical exp.  The
cases are correct (ie: the entries in the dbf are all in caps), as are
the names.  When I use this query, the whole layer dissapears.  Any
ideas?  I'd like to be able to  use:
    ([LEVEL2] eq 'WATER' and [PERIMITER] > 5000), or something similar.

Incidentally, ([LUCODE] < 15) works, but (16 > [LUCODE] < 1) does not.

Thanks in advance,
    Jason Maestri
    Utah Water Research Laboratory
    Utah State University





More information about the mapserver-users mailing list