1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
Connection con;
con=DriverManager.getConnection("jdbc:odbc:base","sa","2012");
Statement select = con.createStatement();
ResultSet result=null;
result = select.executeQuery("SELECT CODE_MACH,COUNT(DISTINCT matr) AS NBR_AFFECTATION,MIN(DATE_DEBU_PROD) AS DEATE_DEBUT_PROD,CODE_TACH,CODE_ETAT_PERS"+
" FROM EVT_PERSONNEL_EC"+
" WHERE MATR<>''"+
" GROUP BY CODE_MACH,CODE_TACH,CODE_ETAT_PERS");
while (result.next()) { // process results one row at a time
String ligne = result.getString(1);
String nombre = result.getString(2);
String date_debut_prod = result.getString(3);
String tache= result.getString(4);
String activite= result.getString(5);
%>
<tr>
<td align="center"><%= ligne%></td>
<td align="center"><%= nombre%></td>
<td align="center"><%= date_debut_prod%></td>
<td align="center"><%= tache%></td>
<td align="center"><%= activite%><label>
</label></td>
</tr>
<% }
result.close();
select.close();
%> |
Partager