Thanks Hamish,
We did this from the GUI and I think that is the problem. We tried it with
no quotes, single quotes, and double quotes. The GUI parsed it differently
in each case. We also tried a single word value for another archaeological
site in the database.
I'm not sure why it doesn't work when the same kind of sql entry box does
work fine in the d.vect GUI. This suggests that db.select is not using (or
only using) the parsing routine used by d.vect.
Michael
On 12/9/04 11:41 PM, "Hamish" <hamish_nospam@yahoo.com> 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=| -vDBMI-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
ah, yes...
This is why I put this hint in the sql help page (after several hours of
it not working for me):Text-string matching requires the text part to be 'single quoted' and
multiple queries should be contained in "double quotes".
[entry from GUI doesn't require the double-quotes..]e.g.
d.vect map where="individual='juvenile' and area='beach'"(New Zealand Sea Lions by the way.. only 8 females left on the mainland)
Hamish
______________________________
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