public static void importExtKeyDB() { try { String sqlStr = "select id_instrument, description, value from trader.instrument left join trader.ext_key_instrument using (id_instrument) where id_ext_key=5 and not value is null;"; ResultSet rs = Quotes.getInstance().getResultSet(sqlStr); while (rs.next()) { String underlyingID = getUnderlyingID(rs.getString(3)); if (underlyingID.length() > 0) System.out.println(", (" + rs.getString(1) + ", " + underlyingID + ")"); } } catch (SQLException ex) { Logger.getLogger(importExtKey.class.getName()).log(Level.SEVERE, null, ex); } }