[GRASS-user] GUI: Use SQL Query - lots of integers from a vector-category ?
Hi, I am using Grass6.3 and the tcltk-GUI: When displaying a vector layer, the 'query vectors for display' allows to provide a SQL query. How can a SQL query of the following kind be entered ? 'my_integer_attribute IN (4,7,19,345,678,111)' Using IN as described above results in an error: DBMI-DBF driver error: SQL parser error: syntax error, unexpected NAME processing 'IN' in statement: SELECT cat FROM country_FOO WHERE FOO_ID IN (2238509,3358510,445812) Error in db_open_select_cursor() --- Using an OR-construction as in attribute=4 OR attribute=7 OR attribute=19 OR ... gets pretty soon tedious. Peter -- Dr. Peter Löwe peter.lo...@gmx.de Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss für nur 17,95 Euro/mtl.!* http://dslspecial.gmx.de/freedsl-surfflat/?ac=OM.AD.PD003K11308T4569a ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] GUI: Use SQL Query - lots of integers from a vector-category ?
On 14/04/09 17:29, Peter Löwe wrote: Hi, I am using Grass6.3 and the tcltk-GUI: When displaying a vector layer, the 'query vectors for display' allows to provide a SQL query. How can a SQL query of the following kind be entered ? 'my_integer_attribute IN (4,7,19,345,678,111)' Using IN as described above results in an error: DBMI-DBF driver error: SQL parser error: syntax error, unexpected NAME processing 'IN' in statement: SELECT cat FROM country_FOO WHERE FOO_ID IN (2238509,3358510,445812) Error in db_open_select_cursor() --- Using an OR-construction as in attribute=4 OR attribute=7 OR attribute=19 OR ... gets pretty soon tedious. Then don't use the dbf backend. This should work with any of the other backends: http://grass.osgeo.org/grass64/manuals/html64_user/sql.html Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user