Re: SQL -- SELECT Recursive
Is I read it, CTE works for a table that contain the tree pointer. That's not the case I presented
Everybody is familiar with "inter-table many-to-many" relationship.
Organization ---> OrganizationPerson <--- Person
OrganizationPerson contains the foreign keys of the parents and data describing the relationship.
The case I presented was for the "intra-table many-to-many" relationship.
Person ---> PersonRelation <--- Person_1 (points back to the same table).
PersonRelation contains the keys of two people, data describing the relationship and is is bideirectional.
Examaple:
tblPerson
1234 JohnSmith
4423 -- Mary Smith
tblPersonRelation
1234 4423 Husband
4423 1234 Wife
I am trying to do an Intra-Table join:
1234 John Smith ---> 1234 4423 Husband <--- 4423 Mary Smith
4423 Mary Smith ---> 4423 1234 Wife <--- 1234 John Smith
The "intra-table recursive" table manages and describes the relation ship via data.
CTE is managing the relationship (one way with no data describing the realationship) via a chaining process.
I guess what your telling me is MySQL can not handle the the "intra-table recursive table."
Do I have that wrong?
Subject
Written By
Posted
Re: SQL -- SELECT Recursive
August 19, 2020 03:32AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.