[gdal-dev] OGR SQL: Excecuting select where column name contains "."

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Mon Oct 8 02:00:14 PDT 2012


Odd Ragnar Lydersen <Odd-Ragnar.Lydersen <at> powel.no> writes:

> 
> I see you have been busy discussing how to handle column names which contain
dot "."
> My problem is that I can't get any reasonable values from the query I make,
whether I use "str1.str2" or
> 'str1.str2' in my expression.
....

> Please help, or confirm if I'm trying to do something illegal


I can confirm that it is not illegal per se because the following works. I hope
that the backslashes and everything go through properly.

ogrinfo WFS:http://188.64.1.61/cgi-bin/tinyows
 -sql "select \"nom.dept\" from \"tows:dot.test\""

It is an open WFS server and you can test it with ogrinfo and from your code
too. However, I will remove the dot.test feature type sooner or later. Verify
and make your code to work in a similar way than ogrinfo.

-Jukka-



More information about the gdal-dev mailing list