[gdal-dev] sqlite dialect: OpenFileGDB and FID Column selection

andy aborruso at gmail.com
Thu Aug 31 14:36:18 PDT 2023


Hi,
if I run

ogr2ogr -f CSV /vsistdout/ data.gdb  -sql "
SELECT OBJECTID from table_EDF_IS limit 1"

I have

OBJECTID,
"1"

Instead, if I run

ogr2ogr -f CSV /vsistdout/ data.gdb  -dialect sqlite  -sql "
SELECT OBJECTID from  table_EDF_IS   limit 1"

I have this error

ERROR 1: In ExecuteSQL(): sqlite3_prepare_v2(SELECT OBJECTID from
table_EDF_IS   limit 1): no such column: OBJECTID

What's the way to use sqlite dialect and select OBJECTID/FID field?
If I use ogrinfo I have "FID Column = OBJECTID"

I'm using GDAL 3.8.0dev-c95490018a, released 2023/07/21

Thank you,

Andrea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230831/c30a1901/attachment.htm>


More information about the gdal-dev mailing list