hi all,
i got a big problem and hope, somebody can help. i have to create a
dynamic delete script which has to run once a day. the script should
find all tables containing a specific column (DEL_YN). then it should
physically delete all records in this tables with value 'Y' in that
column which indicates that the row has been 'deleted' by a user.
i know i can get a cursor with all table-names by the sys.all_objects
joining with the sys.all_tab_columns to determine if the specific
column exists in the table.
and i do know i can use this cursor to delete the records in all the
tables.
what i do not know is how can i assure that the delete script runs
through the tables in the right order (i.e. dependencies,
constraints......)??
can anybody help?
thanks in advance!
kind regards,
bueti