[GRASSLIST:8339] RE: db.execute syntax

Patton, Eric epatton at nrcan.gc.ca
Mon Sep 19 12:27:36 EDT 2005


 Here is the results of the line you suggested:

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
       "


~ Eric.



-----Original Message-----
From: Glynn Clements [mailto:glynn at gclements.plus.com] 
Sent: Monday, September 19, 2005 1:19 PM
To: Patton, Eric
Cc: GRASSLIST at baylor.edu
Subject: RE: [GRASSLIST:8332] db.execute syntax


Patton, Eric wrote:

> echo 'UPDATE Opil184a_ship_nav_med_smth SET MOD_60 = 1 WHERE CAT % 60 
> = 0' | db.execute
                                                                        ^

Here you've made the opposite mistake, using '=' for an equality check when
it should be '=='.

What does the following do:

echo 'UPDATE Opil184a_ship_nav_med_smth SET MOD_60 = 1 WHERE CAT % 60 == 0'
| db.execute

?

--
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-user mailing list