title: Why am I getting the "SQL0134N Improper use of a string column..." error with my query?
body: <p>I am trying to get &quot;unique types of crimes have been recorded at GAS STATION locations&quot; from the table CHICAGO_CRIME_DATA on Juptyter Notebook.</p>
  <pre><code>%sql select DISTINCT PRIMARY_TYPE from CHICAGO_CRIME_DATA WHERE LOCATION_DESCRIPTION = 'GAS STATION';
  </code></pre>
  <p><code>PRIMARY_TYPE</code> and <code>LOCATION_DESCRIPTION</code> are the column names.
  I am operating in IBM DB2. It is producing an error.</p>
  <blockquote>
  <p>ibm_db_sa://ddk87262:***@dashdb-txn-sbox-yp-lon02-01.services.eu-gb.bluemix.net:50000/BLUDB</p>
  <p>(ibm_db_dbi.ProgrammingError) ibm_db_dbi::ProgrammingError: SQLNumResultCols failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0134N  Improper use of a string column, host variable, constant, or function &quot;PRIMARY_TYPE&quot;.  SQLSTATE=42907 SQLCODE=-134</p>
  <p>[SQL: select DISTINCT PRIMARY_TYPE from CHICAGO_CRIME_DATA WHERE LOCATION_DESCRIPTION = 'GAS STATION';]</p>
  <p>(Background on this error at: <a href="http://sqlalche.me/e/f405" rel="nofollow noreferrer">http://sqlalche.me/e/f405</a>)</p>
  </blockquote>
  <p>I have double-checked the column names . The code displays results (with redundant rows) if I dont use the Distinct function.</p>
  <p>What would cause this error?</p>