
26/08/2008, 10:14
|
| | Fecha de Ingreso: abril-2008
Mensajes: 62
Antigüedad: 17 años Puntos: 1 | |
Ayuda con una Consulta Resulta que estoy haciendo conteo de registros en base a diferentes consultas como estas que muestro a continuacion:
<%
strSQL = "SELECT COUNT(id) AS total FROM femenino WHERE p1='R1' OR p1='R2' "
Set RS = Conn.Execute(strSQL)
total=(RS("total"))%>
<%
strSQL = "SELECT COUNT(id) AS total1 FROM femenino WHERE p2='R1' OR p2='R2' "
Set RS = Conn.Execute(strSQL)
total1=(RS("total1"))
%>
<%
strSQL = "SELECT COUNT(id) AS total2 FROM femenino WHERE p3='R1' OR p3='R2' "
Set RS = Conn.Execute(strSQL)
total2=(RS("total2"))
suma=Cint(total)+Cint(total1)+Cint(total2)
response.write(suma)
%>
La variable q van cambiando es "p" q va desde p1 hasta p81 , la pregunta es como puedo hacer este conteo mediante un ciclo y al final mostrar el resultado
Saludos !!! |