[GRASS-user] Trouble with v.db.join and sqlite

Nikos Alexandris nikos.alexandris at felis.uni-freiburg.de
Fri May 30 09:33:24 EDT 2008


On Fri, 2008-05-30 at 06:32 -0700, doktoreas wrote:
> 
> 
> Markus Neteler OSGeo wrote:
> > 
> > On Fri, May 30, 2008 at 1:17 PM, doktoreas <thedoktor78 at gmail.com> wrote:
> >> Markus Neteler OSGeo wrote:
> >>>
> >>> Luca,
> >>>
> >>> can you replicate this with Spearfish or the NC data set?
> >>> Then we could easier test things...
> >>>
> >>> Markus
> >>>
> >>>
> >>
> >> Hi Markus,
> >>
> >> those are the steps to replicate the problem with NC dataset ( all is
> >> done
> >> in a new mapset called sqlite):
> >>
> >> db.connect driver=sqlite
> >> database='$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite.db'
> >> g.copy vect=urbanarea at PERMANENT,urbanarea
> >> v.extract -t input=urbanarea output=urban_point type=point,centroid
> >> v.db.addtable urban_point
> >>
> >> v.db.join map=urbanarea column=cat otable=urban_point ocolumn=cat
> >> ..
> >> DBMI-SQLite driver error:
> >> Error in sqlite3_prepare():
> >> duplicate column name: cat
> >>
> >> ERROR: Error while executing: 'ALTER TABLE urban_point ADD COLUMN cat
> >>       INTEGER
> >>       '
> >> ERROR: Cannot continue (problem adding column).
> >> ERROR: Cannot continue.
> >>
> >> Thanks for your help
> > 
> > Like this it was easy to replicated.
> > (Hopefully) fixed in 6.4.develbranch and 7.trunk.
> > 
> > You can grab the fixed script also here:
> > http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/scripts/v.db.join/v.db.join
> > (download at page bottom)
> > 

Does this mean that the failure of join when using columns with the same
name was a bug?

Thank you,

Nikos



More information about the grass-user mailing list