[GRASS-dev] DBF driver: semicolon and select troubles
Glynn Clements
glynn at gclements.plus.com
Sun Jul 1 02:41:14 EDT 2007
Markus Neteler wrote:
> Hi,
>
> when having a semicolon at the end of a statement, the DBF driver gives
> an error:
>
> echo "select start_map, end_map, start_mp, start_off, end_mp, end_off,
> lid from route_lrs where lcat = 1;" | db.select
> DBMI-DBF driver error:
> SQL parser error: syntax error, unexpected $undefined, expecting $end
> processing ';'
> in statement:
> select start_map, end_map, start_mp, start_off, end_mp, end_off, lid
> from route_lrs where lcat = 1;
> Error in db_open_select_cursor()
>
> This is a problem, because other drivers seem to require it (see
> v.lrs.label).
>
> Without semicolon, it works:
> echo "select start_map, end_map, start_mp, start_off, end_mp, end_off,
> lid from route_lrs where lcat = 1" | db.select
> start_map|end_map|start_mp|start_off|end_mp|end_off|lid
> 185.206836|596.743043|6|0|7|0|22
>
> How to enable the DBF driver to also accept the semicolon here?
Untested:
--- lib/db/sqlp/yac.y 4 Mar 2007 08:34:44 -0000 1.27
+++ lib/db/sqlp/yac.y 1 Jul 2007 06:39:47 -0000
@@ -102,6 +102,7 @@
| y_select
| y_update
| y_delete
+ | y_sql ';'
;
y_alter:
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list