<p dir="ltr">Problem solved! Suggestion was made to use db.execute and it worked without variable declaration.  Thanks for your insight! </p>
<div class="gmail_quote">On Aug 30, 2016 3:17 AM, "Moritz Lennert" <<a href="mailto:mlennert@club.worldonline.be">mlennert@club.worldonline.be</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Alassane,<br>
<br>
Please keep conversations on the list.<br>
<br>
On 29/08/16 19:49, alassane toure wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear Moritz,<br>
I am a newbi in python programming.  Following your instructions i added<br>
the followings..<br>
<br>
par_sqf=[]<br>
c_number=[]<br>
pchng=[]<br>
<br>
but pchng stayed NULL for all rows (see below)!<br>
</blockquote>
<br>
You set pchng = range(len(par_sqf)),<br>
but par_sqf is only defined as a Python variable by<br>
<br>
par_sqf=[]<br>
<br>
so it is normal that it is NULL.<br>
<br>
Don't mix up Python variables and vector map column names.<br>
<br>
If you want to set the attribute column pchng to contain a value that is equal to the length of the value of the attribute column par_sqf (i.e. count the number of digits (plus decimal point) in the area value), then you have to use v.db.update:<br>
<br>
v.db.update map=parcel column=pchng qcol="length(par_sqf)"<br>
<br>
Although I don't understand what the sens of such a length would be.<br>
<br>
Maybe it would be easier if you explained us what you are trying to do, instead of only how you are doing it.<br>
<br>
Moritz<br>
</blockquote></div>