<>StringBuffer or HashMap
这是修订守则的最佳途径,也使业绩更好。
StringBuffer sql = new StringBuffer();
DBDatabase db = UTIL.getDatabase();
sql.append("SELECT I.FLDCODE, I.FLDDESCR, I.FLDWORKPHON FROM ");
sql.append(db.getSchema());
sql.append("TRNINSTR I, ");
sql.append(db.getSchema());
sql.append("TRNCRSIN C WHERE C.FLDCOURSE = ? AND C.FLDINSTRUCT = I.FLDCODE AND (I.FLDINACTIVE IS NULL OR I.FLDINACTIVE <> y ) ORDER BY C.FLDSEQUENCE");
DBPreparedStatement stmt = new DBPreparedStatement(db, sql, "TrainPage.getInfoInstrList");
stmt.setString(1, courseType);
DBResultSet rs = stmt.executeQuery();
stmt.close();