I am working on a Data Base for a library type project. I have These tables from which I need data: Books, Reports, Articles. Using oracle btw.
I need something (trigger or procedure or something else) that runs on the 30th of every month (or the last day), it will then analyze the date of creation of every file in those 3 tables (Books, Reports, Articles) and if the date is older than sysdate - 5 years, then a message should appear with the details of that file (name,date,author).
You have mentioned that message should appear with the details of that file (name,date,author) I am not sure where this should appear.
Still I will give an approach for this problem, you can write a procedure/function in oracle which would write such records(name,date,author) to a log table from which you can see all the details, you can also add a create date, timestamp field to the table (if you want to pull out records based on date). You can use DBMS_SCHEDULER to run the procedure/function every last day of the month. Hope this approach helps.