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
| <html>
<head>
<title>VerifCohFerPreCommSilog</title>
</head>
<body background="../images/fond11.gif">
<font size="5"><b><u>
<p>Vérification cohérence entre l'état "ferme/prévisionel" des commandes de
vente</u></b></p>
<% Set conn = Server.CreateObject("ADODB.Connection")
connstring = "driver={SQL Server};" & "server=xx;uid=xx; pwd=xx; database=xx"
conn.open connstring %>
<% SQL = "select NoAccuseRecepto,CodeClient,NoCommande, NoLigneCommande,ResteExpedier,IndicateurObjet,CodeArticleprestto from COMC where QtePrevueOuFerme='P' and NoCommande in (select NoCommande from COME where Confirmee='O') union all select NoAccuseRecepto,CodeClient,NoCommande, NoLigneCommande,ResteExpedier,IndicateurObjet,CodeArticleprestto from COMC where QtePrevueOuFerme='F' and NoCommande in (select NoCommande from COME where Confirmee='N')"
set rs=server.CreateObject("ADODB.Recordset")
rs.Open sql,conn
OldCode = ""
DO WHILE not rs.eof
if OldCode <> rs("NoAccuseRecepto") then %>
<table>
<tr>
<td><%=rs("NoAccuseRecepto")%>
</td>
</tr>
<% OldCode = rs("NoAccuseRecepto")
end if %>
<% rs.MoveNext: loop %>
</table>
<% conn.close
Set conn = Nothing%>
</font>
</body>
</html> |
Partager