Re: [GRASS-dev] how to use the WHERE ... AND ... in a python script using variables?

2014-05-08 Thread Helmut Kudrnovsky
> 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))

[GRASS-dev] how to use the WHERE ... AND ... in a python script using variables?

2014-05-08 Thread Helmut Kudrnovsky
hi, given some vector with a attribute table column defined as integer/double. task: updating the attribute table by a WHERE ... AND ... clause. some code snippet Python 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license"