Ver Mensaje Individual
  #3  
Antiguo 30-09-2005
Barzaugc Barzaugc is offline
Miembro
 
Registrado: jun 2005
Posts: 50
Reputación: 19
Barzaugc Va por buen camino
No es un error, sino que me muestra informacion repetida y quiero mostrar solamente un registro. El "group by" no me funciona porque son varios campos en el select, solo me funciona con uno, y el distinct me muestra los campos repetidos, como sin no lo pusiera. El codigo es este:

select
distinct oehdrhst.inv_no, --distinct
oehdrhst.ord_no,
oehdrhst.bill_to_name,
oehdrhst.inv_dt,
oehdrhst.tot_sls_amt,
from
oehdrhst left join oelinhst on
oehdrhst.inv_no=oelinhst.inv_no
where
(oehdrhst.inv_dt>=20050801 and oehdrhst.inv_dt<=20050831)
and oehdrhst.inv_no>15000 and
oehdrhst.oe_po_no<>''
group by oehdrhst.inv_no --group by



en el codigo aparecen el distinct y el group by, pero no los puse juntos, probe uno a la vez, solo esta la forma en que los utilice.


Por cierto, gracias por tu tiempo man!!!!
Responder Con Cita