Hola
Prueba así. Se trata de hacer un arreglo
Código asp:
Ver originalSQL = "Select campo From tabla"
registros = rs.getrows()
cantidad = CInt(UBound(registros,2) +1)
Dim valores()
Redim preserve valores(1)
for i = 0 to UBound(registros,2)
valores(0) = Left(registros(0,0),6)
resultado=0
For y=0 to (UBound(valores)-1)
resultado = StrComp(Left(registros(0,i),6),valores(y),1)
if (resultado = 0) Then
Exit For
end if
Next
if(resultado <> 0) Then
Redim preserve valores(UBound(valores)+1)
valores(UBound(valores)-1) = Left(registros(0,i),6)
end if
Next
For p = 0 to UBound(valores)
Response.Write valores(p) & "<br />"
Next
Suerte