title: JDBC error when querying Oracle 11.1 (ORA-00933)
body: <p>I have searched high and low for answers so apologies if it has already been answered!</p>
  <p>Using R I am trying to perform a lazy evaluation of Oracle 11.1 databases. I have used JDBC to facilitate the connection and I can confirm it works fine. I am also able to query tables using dbGetQuery, although the results are so large that I quickly run out of memory.</p>
  <p>I have tried dbplyr/dplyr tbl(con, &quot;ORACLE_TABLE&quot;) although I get the following error:</p>
  <pre class="lang-none prettyprint-override"><code>Error in .verify.JDBC.result(r, &quot;Unable to retrieve JDBC result set for &quot;,  : 
    Unable to retrieve JDBC result set for SELECT *
  FROM &quot;ORACLE_TABLE&quot; AS &quot;zzz39&quot;
  WHERE (0 = 1) (ORA-00933: SQL command not properly ended)
  </code></pre>
  <p>I have also tried using  db_table &lt;- tbl(con, in_schema('ORACLE_TABLE'))</p>
  <p>This is happening with all databases I am connected to, despite being able to perform a regular dbGetQuery.</p>
  <p>Full Code:</p>
  <pre><code># Libraries
  library(odbc)
  library(DBI) 
  library(config)
  library(RJDBC) 
  library(dplyr)
  library(tidyr)
  library(magrittr)
  library(stringr)
  library(xlsx)
  library(RSQLite)
  library(dbplyr)
  </code></pre>
  <h1 id="oracle-connection-53gx">Oracle Connection</h1>
  <pre><code>db &lt;- config::get('db')
  drv1 &lt;- JDBC(driverClass=db$driverClass, classPath=db$classPath)
  con_db &lt;- dbConnect(drv1, db$connStr, db$orauser, db$orapw,  trusted_connection = TRUE)
  
      # Query (This one works but the data set is too large)
  
  
  
   db_data &lt;- dbSendQuery(con_db, &quot;SELECT end_dte, reference, id_number FROM ORACLE_TABLE where end_dte &gt; '01JAN2019'&quot;)
  
      **# Query (this one wont work)**
  
  
  
   oracle_table &lt;- tbl(con_db, &quot;ORACLE_TABLE&quot;)
  </code></pre>
  <p>Solved:</p>
  <ol>
  <li><p>Updated Rstudio + Packages.</p>
  </li>
  <li><p>Follow this manual:
  <a href="https://www.linkedin.com/pulse/connect-oracle-database-r-rjdbc-tianwei-zhang/" rel="nofollow noreferrer">https://www.linkedin.com/pulse/connect-oracle-database-r-rjdbc-tianwei-zhang/</a></p>
  </li>
  <li><p>Insert the following code after 'con':</p>
  <p>sql_translate_env.JDBCConnection &lt;- dbplyr:::sql_translate_env.Oracle
  sql_select.JDBCConnection &lt;- dbplyr:::sql_select.Oracle
  sql_subquery.JDBCConnection &lt;- dbplyr:::sql_subquery.Oracle</p>
  </li>
  </ol>