Hi guys, i got a big trouble with this request and i can t find my mistake, if you could help it would be awesome.
i was looking for a solution to my problem and after several topics i found the recursive structure in oracle, but got this error message : What does this mean? ORA-32039: recursive WITH clause must have column alias list.
I changed the structure but still got the same message, even if my WITH have a column alias list.
Here is my code :
WITH parent(MyParent_ID) AS
( SELECT Parent_ID FROM ROLE WHERE ID = 1
),
tree AS
(SELECT x.Parent_ID,
x.ID
FROM ROLE x
INNER JOIN parent
ON x.Parent_ID = parent.MyParent_ID
UNION ALL
SELECT y.Parent_ID,
y.ID
FROM ROLE y
INNER JOIN tree t
ON y.Parent_ID = t.ID
)
SELECT Parent_ID, ID FROM tree;
I just want all children for the parameter i enter on line 2.
Thank you.