Ver Mensaje Individual
  #3  
Antiguo 04-05-2005
Avatar de Crandel
[Crandel] Crandel is offline
Miembro Premium
 
Registrado: may 2003
Ubicación: Parana, Argentina
Posts: 1.475
Reputación: 23
Crandel Va por buen camino
Hola ELINK,

si no entiendo mal lo que intentas es lograr obtener los nombres junto con la cantidad de ventas

Cita:
Código SQL [-]
 
select idv, sum(cant) from regventas
where fecha > #01/01/2005# and fecha < #31/12/2005# group by idv

Luego al agregarle esto, simplemente falla:
Código SQL [-]
 
select idpersonal.nombres, regventas.idv from regventas, idpersonal
where regventas.ids = idpersonal.ids and regventas.fecha > #01/01/2005# and regventas.fecha < #31/12/2005#
group by regventas.idv
podes resoverlo asi:

Código SQL [-]
SELECT nombres, sum(cant)
  FROM regventas, idpersonal
  WHERE regventas.ids = idpersonal.ids
  AND fecha BETWEEN '01/01/2005' AND '31/12/2005'
  GROUP BY regventas.idv;

Espero que te ayude.

Suerte
__________________
[Crandel]
Responder Con Cita