>>DELETE InvLines FROM InvLines ; >> JOIN InvMast ON InvMast.ivl_Invoice = InvLines.ivl_Invoice ; >> WHERE InvMast.ivm_Batch = sBatchId >>