Forum Stats

  • 3,750,513 Users
  • 2,250,187 Discussions
  • 7,866,997 Comments

Discussions

How to delete content of a table using ROracle?

4121390
4121390 Member Posts: 2
edited Nov 15, 2019 5:55PM in R Technologies

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

Answers