Ver Mensaje Individual
  #5 (permalink)  
Antiguo 14/01/2002, 14:08
Avatar de pcarvajal
pcarvajal
 
Fecha de Ingreso: enero-2002
Mensajes: 701
Antigüedad: 23 años, 4 meses
Puntos: 8
Re: <SELECT DISTINCT> que esta mal???

ahi va!

Set conexion=Server.CreateObject(&quot;ADODB.Connectio n&quot;)
conexion.Open &quot;Driver={Microsoft Visual Foxpro Driver};SourceType=DBF;SourceDb=docente.dbf&quot;
'SQL=&quot;SELECT * FROM docente.dbf ORDER BY rutprof ASC;&quot;
SQL=&quot;SELECT DISTINCT rutprof FROM docente.dbf ORDER BY rutprof ASC;&quot;
set registros=conexion.Execute(SQL)
if not registros.EOF then
while not registros.EOF
rutprof=registros.fields(&quot;rutprof&quot;)
campo1=registros.fields(&quot;campo1&quot;)
campo1=registros.fields(&quot;campo2&quot;)
registros.movenext
wend
end if
set conexion= nothing
set registros= nothing