MySQL Forums
Forum List  »  General

convert slq server query
Posted by: Paulo Betim
Date: January 06, 2022 08:46AM

delete
TB
FROM (SELECT DISTINCT
B.MesRef, b.Segto_Merc, b.Modulo_CG, b.Modulo_G1
FROM tb as a
RIGHT OUTER JOIN TB AS b
ON a.Segto_Merc = b.Segto_Merc AND a.Modulo_CG = b.Modulo_CG AND a.Modulo_G1 = b.Modulo_G1 AND a.MesRef = b.MesRef
WHERE (a.Segto_Merc IS NULL OR a.Modulo_CG IS NULL OR a.Modulo_G1 IS NULL) AND b.MesRef = param_MesRef) AS C
WHERE TB.Segto_Merc = c.Segto_Merc AND TB.Modulo_CG = c.Modulo_CG
AND TB.Modulo_G1 = c.Modulo_G1 AND TB.MesRef = param_MesRef;

Options: ReplyQuote


Subject
Written By
Posted
convert slq server query
January 06, 2022 08:46AM
January 06, 2022 10:10AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.