Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

delete a oracle table at regular interval of 7 days

i would like to delete a oracle table at regular interval of 7 days!! how do i do it without manually running the job....
Labels (2)
2 Replies
Anonymous
Not applicable
Author

Hi Sailesh,
create a simple job with following flow
tDBConnection-->tDBRow 
Write your delete statement in tDBRow component
export the job and schedule it.
Vaibhav
Anonymous
Not applicable
Author

At first you have to figure out how to select the records to delete. In oracle a DATE typed value is actually an integer day and the numbers right to the comma are the time. You can therefore select the data to delete with a simply subtraction like this:
delete from ORDERS where ORDER_DATE > (sysdate - 7)

This statement can by run within a tOracleRow component and if you schedule this job every day you will get a kind of house keeping of the data for 7 days.