Hello good day I have a question, I have a table that says products and one that says equivalents and linked results that I do the query with joins where is this way:
Productos Equivalentes Ligados
00697000 MS-92692 MU-41309-P
MU-41309-P
but in my query it brings me the result like this:
Producto Equivalente Ligado
00697000 MS-92692 MU-41309-P
00697000 MU-41309-P MU-41309-P
and then in the linked I repeat the product MU-41309-P and I do not want to repeat it since it is only once in the table I occupy something like this:
Producto Equivalente Ligado
00697000 MS-92692 MU-41309-P
00697000 MU-41309-P NULL
I have the code like this:
SELECT PROD.C1 AS CVE_PROD, EQUIVALENTES.C1 AS EQUIVALENTES, LIGADOS.C1 AS
LIGADOS
FROM PRODUCTO AS PROD
LEFT JOIN EQUIVALENTE AS EQUIVALENTES ON EQUIVALENTES.C2=PROD.C1
LEFT JOIN LIGADO AS LIGADOS ON LIGADOS.C2=PROD.C1
WHERE PROD.C1='00697000'
ORDER BY PROD.C1