[gdal-dev] OGR SQL on CSV file with field name with parentheses?

John Baumgartner johnbaums at gmail.com
Thu Apr 18 21:52:13 PDT 2019


Try surrounding the field name with square brackets:

ogrinfo -al "Data_directory" -dialect sqlite -sql "SELECT [Vs30(m/s)] as
Vs30 FROM file1"

On Fri, 19 Apr 2019 at 09:32, Moskovitz, Bob at DOC <
Bob.Moskovitz at conservation.ca.gov> wrote:

> Hello gdal_dev,
>
>
>
> I am trying to use ogrinfo on a set of CSV file that has a field with the
> name “Vs30(m/s)”, but change the name to “Vs30”.  Is this possible or do I
> have to edit a bunch of files headers to do this?
>
>
>
> I tried:
>
> ogrinfo -al "Data_directory" -dialect sqlite -sql "SELECT Vs30(m/s) as
> Vs30 FROM file1"
>
> but as expected ogrinfo gave the error message “no such function: Vs30”.
>
>
>
> Thanks in advance!
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190419/a64fc1ed/attachment.html>


More information about the gdal-dev mailing list