Delimiter //
/**
    In batchnum Int : num du lot, si 0 ou null traitement de l'ensembles des lignes
*/
Drop Procedure if exists LOADER_MATCHINGCODES_DELETE//
Create Procedure LOADER_MATCHINGCODES_DELETE (
    In batchnum int
)
Begin
        Delete
            trgt
        From
            MATCHINGCODES trgt
            Inner Join LOADER_MATCHINGCODES_MATCHINGCODES_TOREMOVE src
                On trgt.ID_MATCHINGCODES = src.ID_MATCHCOD
        ;
End //

Delimiter ;


