title: Update Database table from a dataframe in R
body: <p>I have a tabe -<code>table1</code> in DB as below:</p>
  
  <pre><code>FN  FD  IND
  123 Tx1 Q
  124 Tx2 Q
  125 Tx3 Q
  126 Tx4 Q
  127 Tx5 Q
  128 Tx6 Q
  129 Tx7 Q1
  130 Tx8 Q1
  131 Tx9 Q1
  132 T10 Q1
  </code></pre>
  
  <p>I run the following code - to fetch records</p>
  
  <pre><code>library(RODBC)
  channel &lt;- odbcConnect("R",uid="root",pwd="password@123")
  mytable &lt;- sqlQuery(channel, paste(" SELECT * 
                                       from schema.table1 
                                       where Ind="Q1"", sep="" ))
  </code></pre>
  
  <p>Now <code>mytable</code> has 4 records.
  My question is - I need to update the column <code>IND</code> as Q2 for these 4 records (Which means i read those records into R)</p>
  
  <p>The Table <code>mytable</code> can have More records (500 records) in future extraction.
  How can i update the column <code>IND</code> as Q2 for those records that i fetch from DB(ie. <code>mytable</code> in R). I am using <code>SQL Developer</code> as DB.</p>
  
  <p>I tried - below code - but i can do it for 1 record.</p>
  
  <pre><code>update.query &lt;- paste("UPDATE schema.table1 ", 
                         "SET IND='Q2'",
                         "WHERE FN ='129'", sep="")
  dummy &lt;- sqlQuery(channel, update.query)
  </code></pre>
  
  <p><code>mytable</code> is a dataframe in R. And <code>table1</code> is a table in a DB.I am not allowed to create a temporary table in DB.</p>