whats wrong in below query, its throwing error SQL Error: ORA-00933: SQL command not properly ended 00933. 00000 - "SQL command not properly ended". Want to delete all payment_ids from two tables which are matching with ERROR_LOG err_payment_id Please help me in correcting query.
TBLPAYMENT(PAYMENT_ID, OTHER COLUMNS)
TBLPAYMENT_ALT_ID (PAYMENT_ID, OTHER COLUMNS)
ERROR_LOG(ERR_PAYMENT_ID, OTHER COLUMNS)
DELETE TBLPAYMENT, TBLPAYMENT_ALT_ID FROM TBLPAYMENT PYMT INNER JOIN
TBLPAYMENT_ALT_ID PAI ON PYMT.PAYMENT_ID = PAI.PAYMENT_ID
WHERE PYMT.PAYMENT_ID IN (SELECT ERR_PAYMENT_ID FROM ERROR_LOG);
INNER JOINin theDELETEstatement?