ArrayList queryParms = new ArrayList(); StringBuffer sql = new StringBuffer(); sql.append( "SELECT A.FLDREC_NUM, " + "@CHARDATE(A.FLDDATE), " + "T.FLDDESCR, @DEC(A.FLDLEVEL,3) " + " FROM @SCHEMAALCOHOL A LEFT OUTER JOIN @SCHEMADRUGCAUS T " + " ON A.FLDREASON = T.FLDCODE " + " WHERE A.FLDEMPLOYEE = ? " + " ORDER BY A.FLDDATE DESC" ); queryParms.add(new Long(empRec)); Can i use HashSet instead of ArrayList above and does it make any sense in terms of performance?.
What does the query do, do we need to append the query in StringBuffer. Why can't i directly add to ArrayList?