1 2 3 4 5 6 7 8 9 10 11 12
|
private DateFormat dateformatDel = new SimpleDateFormat("dd/MM/yyyy");
maDate = dateformatDel.format(dateSaisie);
requete = "SELECT trans,pointVente, compte, SUM(monTrans)"
+ "FROM transaction"
+ "WHERE (compte LIKE '1%' OR compte LIKE '2%')"
+ "AND(trans='10'"
+ "OR (trans='12' AND monTrans>=1000 AND MOD(monTrans,1000)=0)"
+ "OR trans='13')"
+ "AND dateTrans=TO_DATE('" + maDate + "','dd/MM/yyyy')"
+ "GROUP BY trans,pointVente, compte ORDER BY trans,pointVente, compte";
monResultat = monState.executeQuery(requete); |