On Mon, 7 Mar 2011, Frans-Joost Boogert wrote:

I removed the 'within' quotes and the command line now looks like this:
echo 'UPDATE landuse_table SET FEATURE_ID=1 WHERE
FEATURE=Grazing_land'|db.execute driver=dbf database=$database

Frans-Joost,

  You still don't have the correct syntax. Look at the examples on the
db.execute page:

Update attribute entries to new value based on SQL rule:

echo "UPDATE roads SET travelcost=5 WHERE cat=1" | db.execute

  Notice that the entire expression to be echoed is in double quotes. Other
examples on that page show the column values are in single quotes. Try:

echo "UPDATE landuse_table SET FEATURE_ID=1 WHERE FEATURE='Grazing_land'" | 
db.execute

after setting the driver and database name separately.

Rich

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to