我在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)
这里的语法错误是什么?