问题
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