OGR Virtual problem with Where clause
James Perrins
JamesP at ESDM.CO.UK
Thu Mar 30 05:56:45 PST 2006
Hi,
I'm just experimenting with this - (just discovered it :-)) which looks
great.
I'm calling from mapserver with the XML connection statement in the map file
(IIS5 + Mapserver 4.6.1)
I've been playing with MDB and SQL Server - both of which I can get to plot
points and polygons (with WKT)
In the examples below - KeyField is an Integer in the database and Name is a
text / nvarchar (50)
Plotting the whole layer works fine
<SrcSQL>SELECT * FROM TestPolygon</SrcSQL>
Using a filter on an integer field works fine
<SrcSQL>SELECT * FROM TestPolygon WHERE KeyField=1</SrcSQL>
But I just can't get it to filter using any other sort of where clause -
specifically text string e.g.
<SrcSQL>SELECT * FROM TestPolygon WHERE Name="Cosh"</SrcSQL>
I've tried a variety of syntaxes but no success - everything I try returns
something like:
SQL statement failed, or returned no layer result:
SELECT GEOMETRY FROM TestPolygon WHERE Name="Cosh"
Can anyone help me out ?
Have I got the syntax wrong - if so is there any doc that details this ?
Looking at others questions they seem to have it working - do I need to be
careful of build versions?
Many Thanks
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060330/9d66dd60/attachment.htm>
More information about the MapServer-users
mailing list