What I have:
- Table "CI", many columns in here, ci_id, description, ...
- Table "CI_REL", ci_id, parent_ci_id, child_ci_id
- CI_REL having multiple relations in them, to show that one record in CI has multiple parents, or multiple children records in CI
What I need:
Join the two tables, so I get one record of CI enriched with an Sql ARRAY (VARRAY?) for the parents and children in the record.
Example:
|id | description | children | parents |
|1 | root | [2,3] | null |
|2 | child1 | [3] | [1] |
|3 | child2 | [2] | [1] |
Why do I need this? I'm using Apache Nifi for Data Ingestion into Apache Solr, and need a multivalue field for children and parents. Since the ExecuteSQL is interpreting the sql ResultSet, and acts on finding java.sql.Types.ARRAY in the way I need, I'd like to have a select, that actually returns this, somehow. BTW: I don't have any possibility to use PL/SQL, hopefully this won't make an answer impossible...
Thanks! Henning