[GRASSLIST:7320] Re: db.execute trouble

Glynn Clements glynn at gclements.plus.com
Mon Jun 27 08:22:52 EDT 2005


Moritz Lennert wrote:

> >>Dear GRASS community,
> >>can somebody tell me why the UPDATE operation works with a simple
> >>assignement like in:
> >>echo "UPDATE soils SET area=1000 WHERE area > 200"| db.execute
> >>but return an error with any kind of operation like for example:
> >>echo "UPDATE soils SET area=area+1 WHERE area > 200"| db.execute
> >>or even simply:
> >>echo "UPDATE soils SET area=1+1 WHERE area > 200"| db.execute
> >>
> >>The output error is:
> >>DBMI-DBF driver error:
> >>SQL parser error in statement:
> >>UPDATE suoli SET area=area+1 WHERE area > 200"
> >>Error in db_execute_immediate ()
> >>ERROR: Error while executing: "UPDATE suoli SET area=area+1 WHERE area > 200
> >>"
> > 
> > 
> > 
> > Only a limited set of SQL functions and operators are currently supported.
> > 
> > Addition is not among them.
> > 
> > see the GRASS SQL help page:
> >   http://grass.ibiblio.org/grass61/manuals/html61_user/sql.html
> 
> Would the latest changes to the sql expression parser
> (http://grass.itc.it/pipermail/grass5/2005-June/018588.html and
> following) change this ?

No. Those changes just fix and extend the syntax of arithmetic
expressions within WHERE clauses.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-user mailing list