[GRASS5] sql query error in db.select

Radim Blazek blazek at itc.it
Thu Dec 9 05:36:41 EST 2004


Michael Barton wrote:
> A student and I just tried to look up something in an attribute table in
> GRASS 5.7 using db.select via the autogenerated gui. I've included the
> generated command below. We've also tried this with single quotes and no
> quotes around the field value of "La Contienda". This same syntax works fine
> in d.vect. I'm pretty sure that this computer is using a 11 November version
> of 5.7. Any thoughts?
> 
> db.select table=jaciments_dispersio
> database=$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/ driver=dbf 'sql=TOPONIM="La
> Contienda"' fs=| -v
> 
> 
> DBMI-DBF driver error:
> SQL parser error in statement:
> TOPONIM="La Contienda"
> Error in db_open_select_cursor()
> 
> Michael

Either table or sql.
TOPONIM="La Contienda" should be TOPONIM='La Contienda'.

->
db.select sql="select * from jaciments_dispersio where TOPONIM='La 
Contienda'"

Radim




More information about the grass-dev mailing list