[GRASSLIST:8333] Re: db.execute syntax
Glynn Clements
glynn at gclements.plus.com
Mon Sep 19 11:40:11 EDT 2005
Patton, Eric wrote:
> I'm having a bit of trouble getting my syntax right for this SQL statement.
> I want the query to read through all the cat values in the table, and enter
> the value "1" in an empty column wherever the cat value is divisible by 60
> with no remainder (cat % 60 == 0). Here's what I enetered:
>
> echo 'UPDATE Opil184a_ship_nav_med_smth SET MOD_60==1 WHERE (cat%60)==0' | db.execute
^^
You're using '==' for an assignment, when it should be '='.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list