[GRASS-dev] trying to update column with another text column
mlennert at club.worldonline.be
Wed Apr 4 02:33:31 EDT 2012
On 04/04/12 08:02, Michael Barton wrote:
> I want to update a column with the value of another column. I am using
> The docs say that I can update a column with the value of another column
> by specifying that column in the value field. In fact, if I put the
> names of numeric columns, this works fine (e.g., v.db.update
> map=myvector layer=1 column=summary value=col3 + col4).
> But if I do something like this for a string column, I simply get the
> string of the name of the column (e.g., v.db.update map=myvector layer=1
> column=summary value=col5 put "col5" into the summary column, NOT the
> strings that are STORED in col5).
> Are the docs wrong or is this a bug?
When the column to update is a string column, the script surrounds the
value given with the value= parameter with quotes. It could check
whether the given value is a column name and then not quote it but then
again, how can we know that the person does not what to just fill a
column with a string that corresponds to the name of another column ?
Try using the qcolumn parameter.
So docs should be updated to reflect that.
More information about the grass-dev