[GRASS-dev] [bug #5158] (grass) v.to.db option=query: SQL parser error in statement if no qcolumn specified

this bug's URL: http://intevation.de/rt/webrt?serial_num=5158
-------------------------------------------------------------------------

Subject: v.to.db option=query: SQL parser error in statement if no qcolumn specified

Platform: GNU/Linux/x86
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 2006-09-21

Hi

In spearfish60/PERMANENT:

$ v.to.db -p map=landuse option=query column=label

Reading data trom the map ... 100%
Querying database ... DBMI-DBF driver error:
SQL parser error in statement:
SELECT (null) FROM landuse WHERE cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1
Error in db_open_select_cursor()

ERROR: Cannot open cursor: 'SELECT (null) FROM landuse WHERE cat = 1 OR cat
       = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat =
       1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1
       OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR
       cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR
       cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR
       cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR
       cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR
       cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR
       cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR
       cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR
       cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR cat = 1 OR
       cat = 1'

An error like "You must specify 'qcolumn' for 'option=query'" should be issued instead.

Maciek

-------------------------------------------- Managed by Request Tracker