Ver Mensaje Individual
  #3 (permalink)  
Antiguo 29/08/2008, 02:24
Desfo
 
Fecha de Ingreso: agosto-2007
Mensajes: 27
Antigüedad: 16 años, 9 meses
Puntos: 0
Respuesta: Comparar rangos de numeros en campo string

Gracias, he probado esa forma, y soluciona el problema que tenia.

Sin embargo, aparece otro error. Y es que en caso de empezar el intervalo en 0, también aparecen los registros que son texto.

Select DISTINCT PERSONAS.PK_Victima, Fecha, PERSONAS.*, PK_Acc, Referencia, Cood_Long, Cood_Lat from PERSONAS, ACC,PJ,PROVINCIA,MUNICIPIO where ACC.FK_Municipio=MUNICIPIO.PK_Municipio and MUNICIPIO.FK_PJ=PJ.PK_PJ and PJ.FK_Provincia=1 and (DateDiff('y','01/01/2007',fecha)>=0) and (DateDiff('y','28/12/2007',fecha)<=0) and PK_Acc=PERSONAS.FK_Accidente and Val(Edad) between 0 and 20 order by Fecha, Referencia

Saldría de 0 a 20 años, pero también el valor "Desconocido".