TIA for any assistance.
I have table1 (vuln) and table2 (archive). I have an automation that when the record is created a UUID is created in the vuln table. Then, when the status field of a record in vuln is changed form "new" to "closed" it creates a copy of that record in the archive table.
What I need is another script that does the opposite. When the status field of a record in vuln is changed from "closed" to anything else (basically re-opened) it needs to find the record in archive based on the UUID field and delete the copy of that record from the archive table. I have the trigger setup, but I can't get the script to return the record.
It returns the query, but the filter does not seem to work.
This would be easy if I could just do a view, but I can't. I need to do a weekly purge of the data in the vuln table, but leave the data in the archive data. Hence the data copy.
Here is what i am using for testing: