title: CX_Oracle - import data from Oracle to Pandas dataframe
body: <p>Hy,</p>
  
  <p>I'm new in python and I want import some data from a Oracle Database to python (pandas dataframe) using this simple query</p>
  
  <pre><code>SELECT* 
                  FROM TRANSACTION
                  WHERE DIA_DAT &gt;=to_date('15.02.28 00:00:00',  'YY.MM.DD HH24:MI:SS')
                  AND (locations &lt;&gt; 'PUERTO RICO'
                  OR locations &lt;&gt; 'JAPAN')
                  AND CITY='LONDON'
  </code></pre>
  
  <p>What I did</p>
  
  <pre><code>import cx_Oracle
  ip = 'XX.XX.X.XXX'
  port = YYYY
  SID = 'DW'
  dsn_tns = cx_Oracle.makedsn(ip, port, SID)
  
  connection = cx_Oracle.connect('BA', 'PASSWORD', dsn_tns)
  
  df_ora = pd.read_sql('SELECT* FROM TRANSACTION WHERE DIA_DAT&gt;=to_date('15.02.28 00:00:00',  'YY.MM.DD HH24:MI:SS') AND (locations &lt;&gt; 'PUERTO RICO' OR locations &lt;&gt; 'JAPAN') AND CITY='LONDON'', con=connection)  
  </code></pre>
  
  <p>But I have this error</p>
  
  <pre><code>SyntaxError: invalid syntax
  </code></pre>
  
  <p>What did I do wrong?</p>
  
  <p>Thanks</p>