[gdal-dev] SQL "LEFT JOIN"
Kris R. DeLaney
botany at strato.net
Sun Jul 12 19:56:49 EDT 2009
Re: GDAL 1.6.0, released 2008/11/26
I have be unable to use OGR2OGR to accomplish an SQL LEFT JOIN of a shapefile with the attributes of a master dbf table. If my syntax is not correct, I hope someone can show me where it is wrong.
The files I am using are all in the same directory. I have tried countless variation of syntax, but the two which seem correct, but don't work, are:
(1) ogr2ogr -sql "SELECT test.*, master.DRCLASSDCD FROM test LEFT JOIN master.dbf.MUKEY ON test.MUKEY = master.MUKEY" outshpdir test.shp
(2) ogr2ogr -sql "SELECT test.*, master.DRCLASSDCD FROM test LEFT JOIN 'x:/JUNK/JOIN/master.dbf'.MUKEY ON test.MUKEY = master.MUKEY" outfiles test.shp
Small test files of actual data being tried are at: http://botanicalexplorer.com/gdal/test_files.zip
Any assistance would be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090712/494daebc/attachment.html
More information about the gdal-dev
mailing list