[GRASS-dev] how to use the WHERE ... AND ... in a python script using variables?
Helmut Kudrnovsky
hellik at web.de
Thu May 8 14:40:09 PDT 2014
> grass.run_command("db.execute", sql = "UPDATE %s SET %s='*'", WHERE "%s <
2" AND "%s > 3" % (A, B, C, C))
to answer my own question ;-), there WHERE clause is part of the sql command
... bingo.
grass.run_command("db.execute", sql = "UPDATE %s SET %s='*' WHERE %s < 2
AND %s > 3 % (A, B, C, C))
works fine, sorry for the noise.
-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/how-to-use-the-WHERE-AND-in-a-python-script-using-variables-tp5139315p5139320.html
Sent from the Grass - Dev mailing list archive at Nabble.com.
More information about the grass-dev
mailing list