Forum Stats

  • 3,760,200 Users
  • 2,251,663 Discussions


Updating/deleting rows using ROracle does not complete

user231 Member Posts: 2
edited May 9, 2017 9:48AM in R Technologies

I have successfully connected to an Oracle DB using ROracle and am able to run both select and inset queries on the data - e.g: dbGetQuery(conOut, "insert into TEST1 values(:1,:2,:3,:4,:5,:6,:7,:8)",df).

However when I attempt to either delete or update rows then R hangs - both of the following lines cause this issue:

dbGetQuery(conOut, "update TEST1 set RUN_STATUS = 'COMPLETE' where IX= '2'")

dbGetQuery(conOut, "delete from TEST1 where IX = '2'")

I definitely have write access to the TEST1 table - I can successfully insert rows with ROracle, and can run those update/delete statements successfully with Oracle SQL Developer.

Any idea how to get the update and delete working?


Best Answer

  • Syed Hamd Salman
    Syed Hamd Salman Member Posts: 268
    edited May 9, 2017 9:32AM Accepted Answer

    Could you try dbExecute and dbSendStatement for update and delete instead of dbGetQuery


    dbExecute(conOut, "update TEST1 set RUN_STATUS = 'COMPLETE' where IX= '2';")

    dbExecute(conOut, "delete from TEST1 where IX = '2';")



This discussion has been closed.