title: RSQLite dbGetQuery with input from Data Frame
body: <p>I have a database called &quot;db&quot; with a table called &quot;company&quot; which has a column named &quot;name&quot;.</p>
  <p>I am trying to look up a company name in db using the following query:</p>
  <pre><code>dbGetQuery(db, 'SELECT name,registered_address FROM company WHERE  LOWER(name) LIKE LOWER(&quot;%APPLE%&quot;)')
  </code></pre>
  <p>This give me the following correct result:</p>
  <pre><code>  name             
  1 Apple                       
  </code></pre>
  <p>My problem is that I have a bunch of companies to look up and their names are in the following data frame</p>
  <pre><code>df &lt;- as.data.frame(c(&quot;apple&quot;, &quot;microsoft&quot;,&quot;facebook&quot;))
  </code></pre>
  <p>I have tried the following method to get the company name from my df and insert it into the query:</p>
  <pre><code>sqlcomp &lt;- paste0(&quot;'SELECT name, &quot;,&quot;registered_address FROM company WHERE  LOWER(name) LIKE LOWER(&quot;,'&quot;', df[1,1],'&quot;', &quot;)'&quot;)
  
  dbGetQuery(db,sqlcomp)
  </code></pre>
  <p>However this gives me the following error:</p>
  <pre><code>tinyformat: Too many conversion specifiers in format string
  </code></pre>
  <p>I've tried several other methods but I cannot get it to work.
  Any help would be appreciated.</p>