[gdal-dev] Join problem

William Kyngesburye woklist at kyngchaos.com
Mon Oct 28 18:26:18 PDT 2013


I'm having a problem with with a join.  I suspect it has something to do with the field names.

The shapefile DBF and the lookup DBF have a field name in SJIS: "土地利用種".  The lookup table also has a field "class".  ogrinfo gives me the correct SJIS->UTF8 conversion of the field name in the terminal.

ogr2ogr -sql 'SELECT b.class FROM "L03-b-09_5133" a LEFT JOIN "/path/to/class.dbf".class b ON a."土地利用種" = b."土地利用種"' . L03-b-09_5133.shp

This just gives me a SQL syntax error.

I've successfully run other OGR SQL with the SJIS field, like casting it.  Maybe that's what I should do - cast it to rename it, then do the join (and rename the lookup dbf field also)?

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy




More information about the gdal-dev mailing list