-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oracle: copy_to with overwrite fails #3306
Comments
Thanks for reporting this. Is there an equivalent to |
Unfortunately only a messy one, try to drop the table and catch the "table not exists error" if it is thrown.
|
Thanks. This could be good enough for dbplyr, if we can't do any better. |
@edgararuiz do you want to take this one? |
Yes, I'll take this one |
This issue was moved by krlmlr to tidyverse/dbplyr/issues/120. |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
I am trying to send a table to an Oracle Database via ODBC ,overwriting if it already exists.
The copy_to method in Oracle via ODBC fails when overwrite=TRUE because "DROP TABLE IF EXISTS" isn't valid syntax in Oracle.
Example (without specific credentials), tested with Oracle 11.2:
Expected result:
The table iris is loaded to the database, being overwritten if it already exists.
Actual Result:
There is an error, and the connection can no longer be used (it seems the transaction isn't aborted on failure).
I also tried using ROracle but copy_to seems to fail when attempting to start a transaction:
The text was updated successfully, but these errors were encountered: