Filter layer with MS/SQL based attribute ? b=SMftptmlbsr0DT00M4m7daF/51hDTSm35WHy/94yZIRDphDM0FPGm2tkV1LmtdgbMd5Vk1cBJixCTDeM2f2H/VzIAA9atB3PtyMnroddAltBA7JFses2z3tneVcXv7BSmrrfwOvY116jp4A09d2p0c6uc3Z20p/gGI39T

Frank Warmerdam fwarmerdam at GMAIL.COM
Wed Aug 24 13:59:25 PDT 2005


On 8/24/05, Lars V. Nielsen (HVM) <LVN at hvenegaard.dk> wrote:
> - besides, OGR always perform a LEFT JOIN (apparently adding random values if none are found), so it doesn't filter anything anyway

Lars,

It should be leaving the extra fields NULL if the join lookup fails. 
If that is not the
case, I would appreciate your filing a bug report sufficient for me to
reproduce
the problem. 
 
> - OGR definitely doesn't like non-A-Z characters in the table and column name, I get an SQL parse error if such are used

Generally speaking OGR does allow numbers in table names.  It should also allow
stuff like underscores, but it may be too harsh in it's parsing logic.
 Could you
be more specific about what does not work? 

I just created a shapefile called p2.shp and the following worked:

 ogrinfo -ro -sql 'select * from p2' p2.shp

> I've tried to filter my layer content with both a LAYER/FILTER or a CLASS/EXPRESSION, but how to I test for the value NULL ?

I don't think that MapServer has a concept of NULL values for items,
though I could be wrong.  You may have to filter the items against the
empty string to simulate NULLness.

Best regards, 
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the MapServer-users mailing list