<font size=2 face="sans-serif">Thanks Steve, yes it helps!</font>
<br>
<br><font size=2 face="sans-serif">If an SQL query is needed, would you
suggest to do it in the DATA statement as a subquery or use</font><font size=3 color=#004080 face="sans-serif">
PROCESSING “native_filter=native SQL string”</font>
<p><font size=3 color=blue>steve</font>
<br>
<br>
<br>
<table width=100% style="border-collapse:collapse;">
<tr valign=top height=8>
<td width=40% style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;"><font size=1 face="sans-serif"><b>"Lime,
Steve D (MNIT)" <Steve.Lime@state.mn.us></b> </font>
<p><font size=1 face="sans-serif">2015-03-26 10:20</font>
<td width=59% style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<table width=100% style="border-collapse:collapse;">
<tr valign=top height=21>
<td width=57 style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<div align=right><font size=1 face="sans-serif">A</font></div>
<td style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;"><font size=1 face="sans-serif">"Steve.Toutant@inspq.qc.ca"
<Steve.Toutant@inspq.qc.ca>, "mapserver-users@lists.osgeo.org"
<mapserver-users@lists.osgeo.org></font>
<tr valign=top height=21>
<td width=57 style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<tr valign=top height=21>
<td width=57 style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;"><font size=1 face="sans-serif">RE:
[mapserver-users] ms7 How to use FILTER</font></table>
<br>
<table width=393 style="border-collapse:collapse;">
<tr valign=top height=8>
<td width=57 style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<td width=336 style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;"></table>
<br></table>
<br>
<br>
<br>
<br>
<br><font size=3 color=#004080 face="sans-serif">MapServer FILTERs are
now only written using MapServer expression syntax (e.g. (“[someitem]”
!= “someval”)). Drivers can support translation capabilities to create
native SQL under the hood. This was done to standardize the syntax across
all drivers. Prior to 7.0 the syntax varied by driver. In addition, FILTER
values are preserved when used with WFS or native MapServer attribute queries.</font>
<br><font size=3 color=#004080 face="sans-serif"> </font>
<br><font size=3 color=#004080 face="sans-serif">With database backends
there has been little reason to use FILTERs since you could often just
extend the DATA statement. </font>
<br><font size=3 color=#004080 face="sans-serif"> </font>
<br><font size=3 color=#004080 face="sans-serif">Note that if need to you
can still define a native SQL independently of the DATA statement using
the processing tag “native_filter”, for example:</font>
<br><font size=3 color=#004080 face="sans-serif"> </font>
<br><font size=3 color=#004080 face="sans-serif">  PROCESSING “native_filter=native
SQL string”</font>
<br><font size=3 color=#004080 face="sans-serif"> </font>
<br><font size=3 color=#004080 face="sans-serif">This is also preserved
with WFS. Does this help?</font>
<br><font size=3 color=#004080 face="sans-serif"> </font>
<br><font size=3 color=#004080 face="sans-serif">Steve</font>
<br><font size=3 color=#004080 face="sans-serif"> </font>
<br><font size=3 face="Tahoma"><b>From:</b> mapserver-users-bounces@lists.osgeo.org
[</font><a href="mailto:mapserver-users-bounces@lists.osgeo.org"><font size=3 face="Tahoma">mailto:mapserver-users-bounces@lists.osgeo.org</font></a><font size=3 face="Tahoma">]
<b>On Behalf Of </b>Steve.Toutant@inspq.qc.ca<b><br>
Sent:</b> Thursday, March 26, 2015 8:20 AM<b><br>
To:</b> mapserver-users@lists.osgeo.org<b><br>
Subject:</b> [mapserver-users] ms7 How to use FILTER</font>
<br><font size=3 face="Times New Roman"> </font>
<br><font size=3 face="Arial">I'm confused on how to use FILTER when datasource
is postgis or Oracle Spatial (Native Connection)</font><font size=3 face="Times New Roman">
<br>
</font><font size=3 face="Arial"><br>
In an old thread, I was told to not use FILTER, but use a WHERE clause
in the Data statement.</font><font size=3 face="Times New Roman"> </font><font size=3 face="Arial"><br>
In the ms7 Mapfile-Layer-Data doc, I see for Oracle</font><font size=3 face="Times New Roman">
</font><font size=3 face="Arial"><br>
"</font><font size=3 color=#4f4f4f face="Arial">Note that there are
important performance impacts when using spatial subqueries however. Try
using MapServer’s </font><a href=http://mapserver.org/mapfile/layer.html#filter><font size=3 color=#1f0062 face="Arial"><u>FILTER</u></font></a><font size=3 color=#4f4f4f face="Arial">
whenever possible instead.</font><font size=3 face="Arial">"</font><font size=3 face="Times New Roman">
</font>
<p><font size=3 face="Arial">I remember I had a bug with MS6 when using
FILTER using WFS. A getfeature on the layer with a spatial or logical filter,
the FILTEr in the mapfile was overwritten.</font><font size=3 face="Times New Roman">
</font>
<p><font size=3 face="Arial">Please, how should we define/use FILTER int
a mapfile with postgis and also oracle (using native connection, not ogr)?</font><font size=3 face="Times New Roman">
</font>
<p><font size=3 face="Arial">THANKS!</font><font size=3 face="Times New Roman">
</font>
<br>
<br>
<br>