Ver Mensaje Individual
  #3 (permalink)  
Antiguo 16/07/2009, 09:57
Miguelpunk22
 
Fecha de Ingreso: junio-2009
Ubicación: Lima
Mensajes: 84
Antigüedad: 14 años, 10 meses
Puntos: 1
Respuesta: Consultar ultimo dia del mes en campo FECHA

ya me logro salir bueno aca les dejo mi solucion creo que algunos no podian plantearlo tampoco o quisas no me entendieron:


Código:
  select  fecha,
        idkardex,
        idproducto,
        tipo,
        precio_venta,
        precio_compra
from tagn_kardex
where
idproducto='1'
and
fecha between
  (select max(fecha) from tagn_kardex where idproducto='1' and month(fecha) = month(curdate()) - 1)
  and
  curdate()
order by fecha asc