title: DB2 JDBC: "Same" query gives different results
body: <p>I've been assigned to develop a small Java application to process some data from a DB2 database(used for logging business transactions), and I know a little about the internal settings of the datbase. Currently, I am struggling to find out why a query executed on my application(through JDBC) gives a different result set from a direct query executed on my Quest Central for DB2 client.</p>
  
  <pre><code>    String query = "SELECT DISTINCT SYSTEM_NME FROM MISUSER.USAGE_LOGGER";
  
      try {
          Connection conn = DB2Connect.getDB2Connection();
          Statement stmt = conn.createStatement();
  
          ResultSet rs = stmt.executeQuery(query);
          while(rs.next()){
              retval.add(rs.getString(this.code.column_name));
          }
  
      } catch (SQLException e) {...
  </code></pre>
  
  <p>The above code returns a ResultSet object with 7 rows, while the same query executed on my db2 client returns more than 30 rows. As mentioned earlier, I have minimal experience working with database, and I need some sort of idea how the same query can generate two different results.</p>