[GRASS-dev] syntax for v.db.update???

Michael Barton michael.barton at asu.edu
Fri Aug 15 13:31:24 EDT 2008


I've tried this all combinations that I can think of and still get an  
error. So I'm asking the larger community if anyone knows the secret  
handshake is to get v.db.update to put RGB values into a column for  
coloring vectors.

I would like to get the following to work.

v.db.update map=fields layer=1 column=area value=0:128:128  
where=area>=101 and area<=10000

I've tried delimiting with no quotes, double quotes, single quotes,  
and curly braces. Nothing seems to work. See below. Any suggestions?

GRASS 6.4.svn (Spearfish60_test):~ > v.db.update map=fields layer=1  
column=area value="0:128:128" where="area>=101 and area<=10000"
DBMI-DBF driver error:
SQL parser error: syntax error, unexpected $undefined, expecting $end  
or ';' processing ':'
in statement:
UPDATE fields SET area=0:128:128 WHERE area>=101 and area<=10000

Error in db_execute_immediate()

ERROR: Error while executing: 'UPDATE fields SET area=0:128:128 WHERE
        area>=101 and area<=10000
        '
GRASS 6.4.svn (Spearfish60_test):~ > v.db.update map=fields layer=1  
column=area value='0:128:128' where='area>=101 and area<=10000'
DBMI-DBF driver error:
SQL parser error: syntax error, unexpected $undefined, expecting $end  
or ';' processing ':'
in statement:
UPDATE fields SET area=0:128:128 WHERE area>=101 and area<=10000

Error in db_execute_immediate()

ERROR: Error while executing: 'UPDATE fields SET area=0:128:128 WHERE
        area>=101 and area<=10000
        '
GRASS 6.4.svn (Spearfish60_test):~ > v.db.update map=fields layer=1  
column=area value={0:128:128} where={area>=101 and area<=10000}
bash: =10000}: No such file or directory
GRASS 6.4.svn (Spearfish60_test):~ > v.db.update map=fields layer=1  
column=area value={0:128:128} where=area>=101 and area<=10000
bash: =10000: No such file or directory
GRASS 6.4.svn (Spearfish60_test):~ > v.db.update map=fields layer=1  
column=area value={0:128:128} where="area>=101 and area<=10000"
dbmi: Protocol error
ERROR: Error while executing: 'UPDATE fields SET area={0:128:128} WHERE
        area>=101 and area<=10000
        '
GRASS 6.4.svn (Spearfish60_test):~ > v.db.update map=fields layer=1  
column=area value={0:128:128} where='area>=101 and area<=10000'
dbmi: Protocol error
ERROR: Error while executing: 'UPDATE fields SET area={0:128:128} WHERE
        area>=101 and area<=10000
        '
GRASS 6.4.svn (Spearfish60_test):~ >

Michael


More information about the grass-dev mailing list