title: Providing lookup list from R vector as SQL table for RODBC lookup
body: <p>I have a list of IDs in an R vector. </p>
  
  <pre><code>IDlist &lt;- c(23, 232, 434, 35445)
  </code></pre>
  
  <p>I would like to write an RODBC sqlQuery with a clause stating something like</p>
  
  <pre><code>WHERE idname IN IDlist
  </code></pre>
  
  <p>Do I have to read the whole table and then merge it to the idList vector within R? Or how can I provide these values to the RODBC statement, so recover only the records I'm interested in?</p>
  
  <p><strong>Note:</strong> As the list is quite long, pasting individual values into the SQL statement, as in the answer below, won't do it.</p>