Oracle中,表名和列名要加双引号,字符值要加单引号,以下是R语言中相关语句:
sql = paste0('insert into "modelprediction" ("t_model", "t_road_id", "t_date", "t_risk") values ', "('NextDayMacro', '1', to_date('",substr(Sys.time() ,0,10),"','YYYY-MM-DD'),'",pred$pred,"')")
dbSendUpdate(conn, sql)
dbGetQuery(conn, 'select * from "modelprediction"')