Ver Mensaje Individual
  #2 (permalink)  
Antiguo 17/07/2009, 15:07
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 2 meses
Puntos: 360
Respuesta: buscar solo fechas en datetime

select * from tabla1 a , tabla2 b where a.a_id=b.a_id and date(a_fecha)='2009-07-11' order by a_fecha ASC

Te recomiendo sentencias join. Son las optimas.

select * from tabla1 a inner join tabla2 b on a.a_id=b.a_id where date(a_fecha)='2009-07-11' order by a_fecha ASC

Espero te sirva.
__________________
Without data, You are another person with an opinion.
W. Edwads Deming