<br>Hi, <br><br>I´m getting a sql parsing error when I tried to execute a query to a shapefile where column name starts with "_".<br><br>When i execute a query like : ogrinfo Provincias.shp -sql "SELECT * FROM Provincias WHERE tipo = 1"<br>
<br>INFO: Open of `Provincias.shp'<br> using driver `ESRI Shapefile' successful.<br>Layer name: Provincias<br>Geometry: Line String<br>Feature Count: 21<br>Extent: (309062.030000, 3895521.900000) - (2039227.590000, 7591083.240000)<br>
Layer SRS WKT:<br>PROJCS["500K",<br> GEOGCS["GCS_WGS_1984",<br> DATUM["WGS_1984",<br> SPHEROID["WGS_84",6378137.0,298.257223563]],<br> PRIMEM["Greenwich",0.0],<br>
UNIT["Degree",0.017453292519943295]],<br> PROJECTION["Transverse_Mercator"],<br> PARAMETER["False_Easting",1000000.0],<br> PARAMETER["False_Northing",0.0],<br> PARAMETER["Central_Meridian",-64.0],<br>
PARAMETER["Scale_Factor",1.0],<br> PARAMETER["Latitude_Of_Origin",-90.0],<br> UNIT["Meter",1.0]]<br>ID: String (1.0)<br>_tipo_Area: Integer (10.0)<br>_desc_Area: String (1.0)<br>tipo: Integer (10.0)<br>
OGRFeature(Provincias):29<br> ID (String) = 0<br> _tipo_Area (Integer) = 1<br> _desc_Area (String) = (null)<br> tipo (Integer) = 1<br> LINESTRING (873405.76 7463549.34,873313.54 7463695.39,872765.09 7465104.71,872<br>
623.98 7465495.26)<br><br>But when i want to execute a query like "SELECT * FROM Provincias WHERE _tipoArea = 1"<br><br><br>> ogrinfo Provincias.shp -sql "SELECT * FROM<br>WHERE _tipo_Area = 1"<br>INFO: Open of `Provincias.shp'<br>
using driver `ESRI Shapefile' successful.<br>ERROR 1: SQL Expression Parsing Error: syntax error<br><br><br>Any ideas on how to get around this?<br><br>Best regards,<br><br>-- <br><span><font color="#888888">Gabriel Fusca<br>
SUR Emprendimientos Tecnológicos<br><br>Perú 345 Piso 5to Oficina "B" (C1067AAG)<br>Ciudad de Buenos Aires, Argentina<br>
Tel. +54 (11) 4342-2976/84<br>
<a href="mailto:gabrielfusca@suremptec.com.ar" target="_blank">gabrielfusca@suremptec.com.ar</a><br><a href="http://www.suremptec.com/" target="_blank">http://www.suremptec.com/</a><br></font></span><br>