I am trying to write a delete statement that will remove all the joined records from the following query:
delete from prod.apcinvoice apc
from prod.apcinvoice apc,
where apc.company = apd.company (+)
and apc.vendor = apd.vendor (+)
and apc.edi_nbr = apd.edi_nbr (+)
and apc.invoice = apd.invoice (+)
and apc.suffix = apd.suffix (+)
and apc.company = att.company (+)
and apc.vendor = att.vendor (+)
and apc.invoice = att.invoice (+)
and apc.invoice_dte = TO_DATE('2018-01-29', 'YYYY-MM-DD'));
When I executed the nested query, I get a total of 538 records.
But when I execute everything, I get a total of 650.
What am I missing to delete the correct amount of records?