[GRASSLIST:8342] RE: db.execute syntax
Glynn Clements
glynn at gclements.plus.com
Mon Sep 19 13:24:19 EDT 2005
Patton, Eric wrote:
> Hmm...I gave that a try, with the following results:
>
>
> echo 'UPDATE Opil184a_ship_nav_med_smth SET MOD_60 = 1 WHERE CAT % 60 = 0'
> | db.execute
>
> dbmi: Protocol error (invalid table/column name or unsupported column type)
> ERROR: Error while executing: "UPDATE Opil184a_ship_nav_med_smth SET MOD_60
> = 1 WHERE CAT % 60 = 0
>
> db.describe shows that my cat and MOD_60 columns are indeed INT. So I'm not
> sure why there's a problem with the table column name/type.
Which database backend is this using? The DBF driver doesn't support
the modulus (%) operator. Even so, the error message seems inaccurate.
PostgreSQL doesn't have any problems with the above command.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list