Rodbc error: Error in sqlSave(DataConnection, dataframeInput, tablename = tableNameString, : unable to append to table

爷,独闯天下 提交于 2019-12-12 19:08:53

问题


I am hit with a strange error that neither my IT support nor myself can explain, and it is related to saving from R back into oracle db using RODBC.

specifically, I am hit with this error:

Error in sqlSave(DataConnection, dataframeInput, tablename = tableNameString, : unable to append to table "aaa"

I have a second table "bbb" that has exact same column and constraints as "aaa", and it is able to save the records correctly, so it does not look like an error due to number format, etc.

has someone hit this snag before? I am running using R32bit.


回答1:


You haven't given a lot of specifics here so I can't give you a very good answer. I have seen a similar error in SQL server when I was trying to write to a "temp" table. What I found was that RODBC wants to retrieve the ODBC catalog data for the table (column names and types) before it will write to the table. As a result, if you have an "unusual" table it may not be able to insert to the table. What I ended up doing was writing to an intermediate table and then copying data to my final table. Eventually I may see if I can improve the RODBC code in this area.



来源:https://stackoverflow.com/questions/17204235/rodbc-error-error-in-sqlsavedataconnection-dataframeinput-tablename-tablen

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!