delete FROM BATCH_STEP_EXECUTION_CONTEXT WHERE STEP_EXECUTION_ID IN (
SELECT STEP_EXECUTION_ID FROM BATCH_STEP_EXECUTION WHERE STEP_NAME='autocompleteStep' and status='FAILED');
delete FROM BATCH_STEP_EXECUTION WHERE STEP_NAME='autocompleteStep' and status='FAILED';
delete FROM BATCH_JOB_EXECUTION_CONTEXT WHERE JOB_EXECUTION_ID in (
SELECT JOB_EXECUTION_ID FROM BATCH_JOB_EXECUTION where status='FAILED' and EXIT_MESSAGE like '%autocomplete%');
delete FROM BATCH_JOB_EXECUTION_PARAMS WHERE JOB_EXECUTION_ID in (
SELECT JOB_EXECUTION_ID FROM BATCH_JOB_EXECUTION where status='FAILED' and EXIT_MESSAGE like '%autocomplete%');
delete FROM BATCH_JOB_EXECUTION where status='FAILED' and EXIT_MESSAGE like '%autocomplete%';
delete FROM BATCH_JOB_INSTANCE WHERE JOB_INSTANCE_ID NOT IN (SELECT JOB_INSTANCE_ID FROM BATCH_JOB_EXECUTION);