title: Insert multiple rows from R Dataframe into Oracle Database
body: <p>I have for example dataframe:</p>
  
  <pre><code>df &lt;- as.data.frame(matrix(sample(c(NA, 1:50), 49, replace = TRUE), 7))
  </code></pre>
  
  <p>It looks like this:</p>
  
  <pre><code>  V1 V2 V3 V4 V5 V6 V7
  1 46  6 23  7 22 42  1
  2 47 33 47 50 42 NA 49
  3 14 35 49 48 37 10 22
  4 42 23  5  4 41 46 48
  5 32 36 24 26 19 31 45
  6 26 47 28 19 34 19 32
  7 37 13 46 46 NA 22 49
  </code></pre>
  
  <p>Now I want to write this dataframe to an oracle database <strong>without using sqlSave</strong> because I have a huge data.frame and R Studio crashes if I do it. Instead I decided to do it with sqlQuery:</p>
  
  <pre><code>library(RODBC)
  connHandle &lt;- odbcConnect("DBName", uid="user", pwd="password")
  sqlQuery(connHandle, sprintf("INSERT INTO MYTABLE VALUES %s", stringWithMyDataframeValues))
  close(connHandle)
  </code></pre>
  
  <p>I have read <a href="https://stackoverflow.com/questions/14334840/how-to-insert-a-dataframe-into-a-sql-server-table">this </a> post but it doesn't work for me.</p>
  
  <p>What is the optimal way of doing it? How should my string that I want to pass in look like? Thanks in advance.</p>