如何将列重写(复制)到现有数据库
我有一个名为db.sqlite的数据库
r.memory.data <- data.frame(id=seq(1,10),year=paste0("200",0:9),name=letters[1:10],mark=rbinom(10,1,0.5),label=letters[1:10])
con <- dbConnect(dbDriver("SQLite"), dbname = "C:/ ...db.sqlite")
list.tab <- dbListTables(con)
list.tab
给出"data" "sqlite_data"
tdf <- dbReadTable(con,"data")
给出:
[1] id year name mark label
<0 rows> (or 0-length row.names)
我想用数据框r.memory.data重写现有的db(&#34; data&#34;),如上所示(空列)已经命名的列
尝试重写(复制数据):
query <- paste0("INSERT INTO data SELECT * FROM r.memory.data")
dbSendQuery(con, query)
给出错误:
Error in sqliteSendQuery(con, statement) :
error in statement: no such table: r.memory.data
答案 0 :(得分:2)
var dragbound1:Rectangle = new Rectangle(0, 0, stage.stageWidth, stage.stageHeight);
function touchhero(event:TouchEvent):void
{
hero.startTouchDrag(event.touchPointID, false, dragbound1);
stage.addEventListener(Event.ENTER_FRAME, gohero);
}
function drophero(event:TouchEvent):void
{
hero.stopTouchDrag(event.touchPointID);
}
function gohero(event:Event):void{
if(hero.hitTestObject(wall)){
//popup something
}
}
我会尝试这样做