<div dir="ltr"><div><div><div><div><div><div>Hi,<br><br>I am just struggling with a code line. I want to assign a value to all cells<br></div>of a defined column. Thus I try to run in python:<br><br>probvalue=100.0<br>grass.write_command("db.execute",stdin = "UPDATE my_points SET prob=%d" %(probvalue))<br>
<br></div>So far I checked that the string for stdin is generated correctly:<br>>>>"UPDATE my_points SET prob=%d" %(probvalue)<br>UPDATE my_points SET prob=100<br><br></div>However the column is not updated. When executing the sql line directly in db.execute (GUI) everything works and the column shows 100 for all rows.<br>
<br></div>Any hints?<br><br></div>I have tried this on GRASS 7, Ubuntu, Python 2.7.3<br><br></div>/Johannes<br></div>