donc que si j'ai deux lignes ou plus égale que ca ne me ramene que par exemple celle ou la date d'effet est la plus petite
je vous joint mon code
merci de votre aide
<%
'connexion avec la base de données
set conn=Application("connexion")
'recup du matricule salarie
if request.queryString("liste_salarie")<>"" then
cle = request.queryString("liste_salarie")
'recup des données du salarie
sql_salarie = "SELECT S.*,CL.dateDebClass,CL.dateFinClass,CL.dateDebEchelon,CL.idQualification,Q.libQualification,CL.coefKCCN,CL.catSolvay,CL.echelon,CL.idTypeHoraire,TH.idTypeHoraire,TH.libTypeHoraire,CL.idINSEEF,I.libINSEEF FROM salarie S,Classification CL,Qualification Q,TypeHoraire TH,INSEEF I where S.matricule ='" & cle & "' and S.matricule = CL.matricule(+) and CL.idQualification = Q.idQualification(+) and CL.idTypeHoraire = TH.idTypeHoraire(+) and CL.idINSEEF = I.idINSEEF(+) order by (dateDebEchelon) DESC"
set infos_salarie = conn.Execute(sql_salarie)
Session("liste_salarie")=cle
if not(infos_salarie.EOF) then
nom = infos_salarie("nom")
prenom = infos_salarie("prenom")
dateDebClass = infos_salarie("dateDebClass")
dateDebClass = Day(dateDebClass )&"/"&Month(dateDebClass )&"/"&Year(dateDebClass )
dateFinClass = infos_salarie("dateFinClass")
dateFinClass = Day(dateFinClass )&"/"&Month(dateFinClass )&"/"&Year(dateFinClass )
libQualification = infos_salarie("libQualification")
libINSEEF = infos_salarie("libINSEEF")
coefKCCN = infos_salarie("coefKCCN")
catSolvay = infos_salarie("catsolvay")
idTypeHoraire = infos_salarie("idTypeHoraire")
libTypeHoraire = infos_salarie("libTypeHoraire")
echelon = infos_salarie("echelon")
end if
end if
%>
<html>
<head>
<title>Classification(s) du salarié</title>
</head>
<body bgcolor="#FFFFCC">
<p align="center"><font size="5" color="#808080" face="MS Sans Serif"><b>Historique des classifications</b></font></p>
<hr>
<br>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="95%" id="AutoNumber1" height="74">
<tr>
<td width="20%" align="center" height="51">
<p align="center"><font face="MS Sans Serif"><span style="font-size: 11pt">Qualification</span></font></td>
<td width="8%" align="center" height="51"><font face="MS Sans Serif">
<span style="font-size: 11pt">Coef CCN</span></font></td>
<td width="18%" height="51">
<p align="center"><font face="MS Sans Serif"><span style="font-size: 11pt">Cat. Pers.</span></font></td>
<td width="3%" height="51">
<p align="center"><font face="MS Sans Serif"><span style="font-size: 11pt">Échelon</span></font></td>
<td width="12%" height="51">
<p align="center">
<font face="MS Sans Serif"><span style="font-size: 11pt">Date d'effet</span></font></td>
</tr>
<% Do While Not(infos_salarie.EOF) %>
<tr>
<%
dateDebClass = infos_salarie("dateDebClass")
if dateDebClass<>0 then
dateDebClass = Month(dateDebClass )&"/"&Day(dateDebClass )&"/"&Year(dateDebClass )
If Len(Day(dateDebClass ))=1 Then
temp="0"&Day(dateDebClass )&"/"
Else
temp=Day(dateDebClass )&"/"
End If
If Len(Month(dateDebClass ))=1 Then
temp=temp&"0"&Month(dateDebClass )&"/"
Else
temp=temp&Month(dateDebClass )&"/"
End If
temp=temp&Year(dateDebClass )
dateDebClass = temp
end if
DateDebEchelon= infos_salarie("DateDebEchelon")
if DateDebEchelon<>0 then
DateDebEchelon= Month(DateDebEchelon)&"/"&Day(DateDebEchelon)&"/"&Year(DateDebEchelon)
If Len(Day(DateDebEchelon))=1 Then
temp="0"&Day(DateDebEchelon)&"/"
Else
temp=Day(DateDebEchelon)&"/"
End If
If Len(Month(DateDebEchelon))=1 Then
temp=temp&"0"&Month(DateDebEchelon)&"/"
Else
temp=temp&Month(DateDebEchelon)&"/"
End If
temp=temp&Year(DateDebEchelon)
DateDebEchelon= temp
end if
%>
<td width="20%" height="22">
<input type="text" name="libQualification" VALUE= "<%=infos_salarie("libQualification")%>" size="68" readonly="1" style="font-size: 8pt; color: #CC3300; background-color:#FFFFCC" ></td>
<td width="8%" height="22">
<input type="text" name="coefKCCN" VALUE= "<%=infos_salarie("coefKCCN")%>" size="9" readonly="1" style="font-size: 8pt; color: #CC3300; background-color:#FFFFCC" ></td>
<td width="18%" height="22">
<input type="text" name="catSolvay" VALUE= "<%=infos_salarie("catSolvay")%>" size="20" readonly="1" style="font-size: 8pt; color: #CC3300; background-color:#FFFFCC" ></td>
<td width="12%" height="22">
<input type="text" name="echelon" VALUE= "<%=infos_salarie("echelon")%>" size="9" readonly="1" style="font-size: 8pt; color: #CC3300; background-color:#FFFFCC"></td>
<td width="15%" height="22">
<input type="text" name="dateDebClass" VALUE= "<%=dateDebEchelon%>" size="12" readonly="1" style="font-size: 8pt; color: #CC3300; background-color:#FFFFCC" ></td>
<%
infos_salarie.MoveNext
Loop
%>
</tr>
</table>
</body>
</html>