title: Query not running in HSQLDB
body: <p>I am using HSQLDB for JUNIT testing.</p>
  
  <p>There is a query that is not excuting in HSQL but executes with Sybase drivers.
  I am using Spring JDBC to run the queries and hsqldb.1.8.1.jar file for HSQLDB.</p>
  
  <p>Below is the Code:</p>
  
  <pre><code>public static final String ORG_CODE_QUERY = "SELECT ORG_CODE = org.name " +
           "  FROM " + ORGANIZATION  + " org " +
           " WHERE org.id   = ? " +
           "   AND org.industry = ?  ";
  
  
  public List&lt;String&gt; getOrgCode(RequestPayload rqstPayload) {
          return getJdbcTemplate().query(ORG_CODE_QUERY, new Object[]{rqstPayload.getId(),rqstPayload.getIndustry()}, new ResultSetExtractor&lt;List&lt;String&gt;&gt;() {
              public List&lt;String&gt; extractData(ResultSet rs) throws SQLException {
                  List&lt;String&gt; list = new ArrayList&lt;String&gt;();
                  while(rs.next()) {
                      list.add(rs.getString("ORG_CODE"));
                  }
                  return list;
              }
          });
      }
  </code></pre>
  
  <p>Spring Configuration :</p>
  
  <pre><code> &lt;bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"&gt;
          &lt;property name="driverClass" value="org.hsqldb.jdbcDriver" /&gt;
          &lt;property name="jdbcUrl" value="jdbc:hsqldb:mem:test" /&gt;
          &lt;property name="user" value="sa" /&gt;
          &lt;property name="password" value="" /&gt;
          &lt;property name="minPoolSize" value="5" /&gt;
          &lt;property name="maxPoolSize" value="10" /&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>This query runs perfectly when the Sybase datasource is passed to JDBCTemplate but fails when HSQLDB datasource is passed.</p>
  
  <p>It also runs in HSQL if i change the String as below</p>
  
  <pre><code>public static final String ORG_CODE_QUERY = "SELECT org.name as ORG_CODE" +
           "  FROM " + ORGANIZATION  + " org " +
           " WHERE org.id   = ? " +
           "   AND org.industry = ?  ";
  </code></pre>
  
  <p>Unfortunately can't change the production Code .</p>
  
  <p>I get the below error:</p>
  
  <pre><code>Caused by: java.sql.SQLException: Column not found: ORG_CODE in statement 
  </code></pre>
  
  <p>Please let me know if there is turnaround for this issue.</p>
  
  <p>Thanks
  Avnish</p>