[gdal-dev] Gdal and SQLite
Federico Jurio
federicojurio at suremptec.com.ar
Tue Dec 23 05:33:39 PST 2014
Hi guys, i'm trying to make a simple query using sqlite through gdal
library ( http://www.gdal.org/ogr_sql.html )
I have a simple table with two columns: ID and (asd*) (both columns have
integer values)
I want the minimun value of this columns
My first attempt was successful
E:\Pruebas>ogrinfo -sql "select min(id) MINID from Geo1" Geo1.shp
INFO: Open of `Geo1.shp'
using driver `ESRI Shapefile' successful.
Layer name: Geo1
Geometry: None
Feature Count: 1
Layer SRS WKT:
(unknown)
MINID: Integer (10.0)
OGRFeature(Geo1):0
MINID (Integer) = 2
My second attempt was unsuccessful
E:\Pruebas>ogrinfo -sql "select min((asd*)) MINASD from Geo1" Geo1.shp
INFO: Open of `Geo1.shp'
using driver `ESRI Shapefile' successful.
ERROR 1: SQL Expression Parsing Error: syntax error, unexpected ')'.
Occured around :
select min((asd*)) MINASD from Geo1
E:\Pruebas>ogrinfo -sql "select min("(asd*)") MINASD from Geo1" Geo1.shp
INFO: Open of `Geo1.shp'
using driver `ESRI Shapefile' successful.
ERROR 1: SQL Expression Parsing Error: syntax error, unexpected ')'.
Occured around :
select min((asd*)) MINASD from Geo1
Can someone help me with the correct expression?
Thanks in advance!
Regards
--
Federico Jurio
SUR Emprendimientos Tecnológicos
Perú 345 Piso 5to Oficina "B" (C1067AAG)
Ciudad de Buenos Aires, Argentina
Tel. +54 (11) 4342-2976/84
federicojurio at suremptec.com.ar
www.suremptec.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20141223/1f05a380/attachment.html>
More information about the gdal-dev
mailing list