On vendredi 19 avril 2019 14:52:13 CEST John Baumgartner wrote: > Try surrounding the field name with square brackets: > > ogrinfo -al "Data_directory" -dialect sqlite -sql "SELECT [Vs30(m/s)] as > Vs30 FROM file1"
Brackets won't work with OGR SQL or SQLite. You must use double quotes On a Bash shell, if you use double quotes for the SQL statement itself, you need to escape them ogrinfo test.csv -sql "select \"VS30(m/s)\" as VS30ms from test" On Windows cmd.exe, you might also apparently try the above in most cases, but there are some subtleties and dangers in some cases (not for the above one), as underlined by https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/ (paragraph "cmd.exe" and following) Even -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
