navrsalemile
Programmer
I have the following probnlem: there are two tables used in the report, JOB and TASK related as 1:N.
job_num, open_dte, close_dte JOB table
task_code, job_num TASK table
Jobs are dynamically changed by adding a new record into job table and keeping old records in the same table (there are two date fields, open_dte and close_dte. When close_dte is set to a non-null value that means the record was split or merged. Merging means there can be many parents in JOB table, each contributing it's corresponding TASK links to the newly created JOB record. Splitting means that some links from TASK to JOB table are reassigned to newly created JOB record, i.e. there can be many children in JOB table).
How should query look like in order to present history of a job change, e.g. starting with a job ID 12345 and presenting all splits and/or mergers in hierarchical way, sorted by date?
I tried using start with/connect by but this only works on tree structures while in this case JOB table is like a graph (m:n associations)
many thanks,
Mile
job_num, open_dte, close_dte JOB table
task_code, job_num TASK table
Jobs are dynamically changed by adding a new record into job table and keeping old records in the same table (there are two date fields, open_dte and close_dte. When close_dte is set to a non-null value that means the record was split or merged. Merging means there can be many parents in JOB table, each contributing it's corresponding TASK links to the newly created JOB record. Splitting means that some links from TASK to JOB table are reassigned to newly created JOB record, i.e. there can be many children in JOB table).
How should query look like in order to present history of a job change, e.g. starting with a job ID 12345 and presenting all splits and/or mergers in hierarchical way, sorted by date?
I tried using start with/connect by but this only works on tree structures while in this case JOB table is like a graph (m:n associations)
many thanks,
Mile