- 5 Posts
- 49 Views
How best to delete rows from the Oracle table user_scheduler_job_run_details? Any precautions needed? Is there an existing job or procedure that handles this?
@Tony Esposito To delete rows with user key values appearing in the EIM tables
Set the delete exact parameter in the EIM configuration file to true; its default value is false.
Add the ONLY BASE TABLES parameter and set this parameter to the name of the base table you want to delete.
The following example contains lines that can be used in the EIM configuration file to delete rows with user key values in the EIM tables from the Accounts table:
TYPE = DELETE
BATCH = 200
TABLE = EIM_ACCOUNT
DELETE EXACT = TRUE
ONLY BASE TABLES = S_ACCNT_POSTN
You can use a statement, this statement lists the table you want to remove rows from. Make sure you add a where clause that identifies the data to delete, or else you will delete all the rows. Try this below code:
delete from table_to_remove_data where rows_to_remove = 'Y';
You can also delete all the rows at once by using a truncate statement. For example
truncate table to_empty_it;
The source of this solution is here encodingcompiler