[GRASS5] sql query error in db.select

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
______________________________
Michael Barton, Professor of Anthropology
School of Human, Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

db.select table=jaciments_dispersio
database=$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/ driver=dbf
'sql=TOPONIM="La Contienda"' fs=| -v

I don't think it is your error, but in general note that fs=| needs to
be quoted: fs='|'

(and fs=| is default so just leave it out)

Hamish

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