[GRASSLIST:8339] RE: db.execute syntax

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@gclements.plus.com]
Sent: Monday, September 19, 2005 1:19 PM
To: Patton, Eric
Cc: GRASSLIST@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@gclements.plus.com>