Hi All,
I am using a database in which foreugn key relationship is not enforced at the database level but at the application level.
I am working on archiving an OLTP database, in which, after saving records older than, say, 1 year, into another database, these records should be deleted from the OLTP database.
How can I delete child records based on a condition applied on one of the records of the parent table.
Say parent_table is :
Col1 varchar2
Col2 varchar2
Col3 DATE
and child_table is:
Col1 varchar2
Col2 varchar2
I need to delete from child_table when the corresponding parent table record's DATE Col3 is more than 12 months old.
How can I do that ?
Any help will be highly appreciated.
I am using a database in which foreugn key relationship is not enforced at the database level but at the application level.
I am working on archiving an OLTP database, in which, after saving records older than, say, 1 year, into another database, these records should be deleted from the OLTP database.
How can I delete child records based on a condition applied on one of the records of the parent table.
Say parent_table is :
Col1 varchar2
Col2 varchar2
Col3 DATE
and child_table is:
Col1 varchar2
Col2 varchar2
I need to delete from child_table when the corresponding parent table record's DATE Col3 is more than 12 months old.
How can I do that ?
Any help will be highly appreciated.