I am trying to write a SQL script that will return process instances that might have entries on the following tables:
What is the key field(s) that ties this information with the rest of the BPM_RUN tables?
Thanks in advance!
BPM_RUN_ASSIGNEES has a table_name / pk_id column pair that act as a compound foreign key reference. table_name, as it sounds, will be populated with the name of the table this record is referencing/joining to, and pk_id refers to the ID column in that referenced table.
Then BPM_RUN_ASSIGNEE_NOTES has a RUN_ASSIGNEE_ID value that will point to BPM_RUN_ASSIGNEES.ID
Finally, BPM_RUN_REPLACE_ASSIGNEES has another table_name / pk_id pair.
SELECT DISTINCT TABLE_NAME FROM BPM_RUN_ASSIGNEES
SELECT DISTINCT TABLE_NAME FROM BPM_RUN_REPLACE_ASSIGNEES
Those queries will help you shortlist (at least for your system) which other tables those ones are referencing.
This totally makes sense to me now! Thanks for your help!!