I'm having trouble with a SQL query and I was wondering if any one of you could use a little of your time to help me.
I have the following query
SELECT
cfd_enc.id,
cfd_enc.version,
cfd_enc.prefijo,
cfd_enc.fecha,
cfd_enc.cfd,
cfd_enc.no_aprobacion,
cfd_enc.tipo_comprobante,
cfd_det.id_orden,
cfd_det.producto,
cfd_det.total
FROM cfd_parametros,cfd_enc LEFT JOIN cfd_det ON cfd_enc.id=cfd_det.id_orden
which gets me this:
(I have 6 rows in cfd_det that share id_orden with cfd_enc.id)
Is there any way I could combine all the repeated rows to get something like this?
Any help is really appreciated. I'm really stuck, so let me know if you need more specific information.