[GRASS-dev] [GRASS GIS] #1930: Quote column names when creating tables via sqlite
GRASS GIS
trac at osgeo.org
Mon Apr 15 02:35:12 PDT 2013
#1930: Quote column names when creating tables via sqlite
-------------------------+--------------------------------------------------
Reporter: scw | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: unspecified
Keywords: | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
I have an input table which includes the column 'unique', and it failed to
import, with the error:
{{{
DBMI-SQLite driver error:
Error in sqlite3_prepare():
near "varchar": syntax error
}}}
This is due to "unique" being a reserved keyword in SQLite. This can be
fixed by quoting column names prior to passing them to SQLite, see this
page for details:
http://www.sqlite.org/lang_keywords.html
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1930>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list