Ver Mensaje Individual
  #8  
Antiguo 29-05-2012
jfrancho jfrancho is offline
Miembro
 
Registrado: feb 2008
Posts: 50
Reputación: 17
jfrancho Va por buen camino
Thumbs down

Buen día: el campo cantidad me funciona perfectamente si hago la consulta de esta manera

Código SQL [-]
select det.descripcion, det.cantidad
from tdetalles det
inner join tfacturas fac on fac.nrofactura=det.nrofactura
where fac.fecha between :vfec1 and :vfec2

pero si agrego esto, me da error, la verdad me mató:

Código SQL [-]
select det.descripcion, sum(det.cantidad)
from tdetalles det
inner join tfacturas fac on fac.nrofactura=det.nrofactura
where fac.fecha between :vfec1 and :vfec2
group by det.descripcion

Saludos y Gracias por su respuesta.
Responder Con Cita