[GRASS-user] v.in.db and dbf-tables SQL parser error

Moritz Lennert mlennert at club.worldonline.be
Wed Sep 20 04:18:49 EDT 2006

Wolfgang Qual wrote:
> Hello Moritz, aah! Thank you very much - it worked without problems
> now. I did not know this before (*other* programs do not care about
> this ;) - maybe it would be reasonable to add a paragraph
> "requirements for the input table" to the manual page of v.in.db
> (tablename has to start with a character...)

Other programs do not care about this when you are limiting yourself to 
dbf files, but as far as I know the SQL standard forbids numbers for 
table names and the database drivers in GRASS try to implement that.

We could add such a note to the man page, but would have to do so in the 
man page of every module that manipulates tables. Thus the idea of 
having a general grass sql support man page. The v.in.db page should at 
least link to that man page.


> Best regards, Wolfgang
> -------- Original-Nachricht -------- Datum: Wed, 20 Sep 2006 09:43:26
> +0200 Von: Moritz Lennert <mlennert at club.worldonline.be> An: Wolfgang
> Qual <Wolfgang.Qual at gmx.net> Betreff: Re: [GRASS-user] v.in.db and
> dbf-tables SQL parser error
>> Wolfgang Qual wrote:
>>> Good morning, GRASS-users, I encountered a problem when using
>>> v.in.db with dbf-tables.
>>> GRASS 6.1.cvs (muc_intra):~ > v.in.db driver=dbf database=./ 
>>> table=2006_07_linux x=Quer y=Hoch key=Idcol out=sender47 DBMI-DBF
>>>  driver error: SQL parser error in statement: select Idcol, Quer,
>>> Hoch from 2006_07_linux Error in db_open_select_cursor()
>>> ERROR: Cannot open select cursor: 'select Idcol, Quer, Hoch from
>>>  2006_07_linux'
>>> I checked the columns in OpenOffice - all named columns in the 
>>> grass-command where of type numeric with no decimal places. The
>>> funny thing is that the same command worked perfectly with
>>> another table (this table contained only few records). At the
>>> moment, I do not know, what could cause this error - maybe
>>> someone else encountered the same problem? Ideas are more than
>>> welcome!
>> From http://grass.itc.it/grass62/manuals/html62_user/sql.html
>> "A table name must start with a character, not a number."
>> Moritz

More information about the grass-user mailing list