Thanks John, it worked perfectly!

From: John Baumgartner <[email protected]>
Sent: Thursday, April 18, 2019 9:52 PM
To: Moskovitz, Bob@DOC <[email protected]>
Cc: [email protected]
Subject: Re: [gdal-dev] OGR SQL on CSV file with field name with parentheses?

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@DOC 
<[email protected]<mailto:[email protected]>> 
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
[email protected]<mailto:[email protected]>
https://lists.osgeo.org/mailman/listinfo/gdal-dev<https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fgdal-dev&data=02%7C01%7CBob.Moskovitz%40conservation.ca.gov%7Cbe37bd898b284d9b257e08d6c482d295%7C4c5988ae5a0040e8b065a017f9c99494%7C0%7C1%7C636912463499656682&sdata=OZJ%2FGfBXcYshyy6evRQFKlrGUBQEw3kNiT6%2BVWsX9Vk%3D&reserved=0>
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to