GRASS GIS db.execute中的SQL查询语法错误

时间:2014-01-30 20:38:34

标签: sql gis

我在Ubuuntu上运行GRASS GIS 6.4.1,我试图在db.execute中使用以下SQL查询连接两个表来创建一个新表:

echo "CREATE TABLE landcover_new AS SELECT * FROM landcover OUTER JOIN landcover_legend ON landcover.CODE_00 = landcover_legend.CODE3" | db.execute

我收到以下内容:

(Thu Jan 30 14:59:23 2014)                                                      
db.execute input=/home/mightyoak/grassdata/Majorca/PERMANENT/.tmp/ubuntu/2348.6 
DBMI-SQLite driver error:
Error in sqlite3_prepare():
near "echo": syntax error
ERROR: Error while executing: 'echo "CREATE TABLE landcover_new AS SELECT * FROM landcover OUTER JOIN landcover_legend ON landcover.CODE_00 = landcover_legend.CODE3" | 
db.execute
'
(Thu Jan 30 14:59:23 2014) Command finished (0 sec)  

这里的语法错误是什么?

0 个答案:

没有答案