Skip to Main Content

Data Science & Machine Learning

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to delete content of a table using ROracle?

4121390Oct 28 2019 — edited Nov 15 2019

I have created a connection from R to my Oracle Database using ROracle.

I can do query and write table from R.

Now I have a case where I have to write to a table, but the permission doesn't allow me to overwrite the table when using dbWriteTable function.

So, I have to first clear the content of the table using "delete from" query, then use dbWriteTable and append to write to the table.

I can query the "delete from" using Toad, but I need to do it from R because I need to automate the process.

The problem is, the query "delete from" never finished when done from R.

I have tried using dbGetQuery and dbSendQuery.

I have tried the solution from this as well (using dbExecute and dbSendStatement), but the same problem occurs

Updating/deleting rows using ROracle does not complete

Anybody can help suggesting a solution?

Thank you very much

Comments

Post Details

Added on Oct 28 2019
3 comments
745 views