[GRASSLIST:8341] RE: db.execute syntax

Glynn Clements glynn at gclements.plus.com
Mon Sep 19 13:19:35 EDT 2005


Trevor Wiens wrote:

> > 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 '=='.
> 
> Correct me if I'm wrong but to my knowledge == and = are not used in
> SQL the way they are in C for example. In fact AFAIK == is not used at
> all in standard SQL, it isn't referenced in the PostgreSQL
> documentation for 8.0 that I can find.

You're right; I got confused by the presence of "==" in the original
version. Both should be "=", which was Eric's second attempt.

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




More information about the grass-user mailing list