[GRASSLIST:8332] db.execute syntax

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


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
 
I know there has to be something wrong with that WHERE clause, but my SQL's
really bad.
 
 
Any ideas?
 
~ Eric.
 
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Eric Patton
 
Technologist, Geo-Spatial Data Services
Geological Survey of Canada (Atlantic)
Natural Resources Canada
Bedford Institute of Oceanography
Dartmouth, Nova Scotia, Canada B2Y 4A2
 
Postal address: P.O. Box 1006
Courier address: 1 Challenger Drive
 
Telephone: (902)426-7732
Facsimile:  (902)426-4104
E-mail:        <mailto:epatton at NRCan.gc.ca> epatton at NRCan.gc.ca
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20050919/774a73f1/attachment.html


More information about the grass-user mailing list