I have the following table in oracle:
Parent(arg1, arg2)
and I want the transitive closure of the parent relationship. That is, I want the following table
Ancestor(arg1, arg2)
How is this possible in Oracle?
I do the following:
WITH Ancestor(arg1, arg2) AS ( SELECT p.arg1, p.arg2 from parent p UNION SELECT p.arg1 , a.arg2 from parent p, Ancestor a WHERE p.arg2 = a.arg1 ) SELECT DISTINCT * FROM Ancestor;
I get an error
*Cause: column aliasing in WITH clause is not supported yet *Action: specify aliasing in defintion subquery and retry Error at Line: 1 Column: 20
How can I solve this problem without column aliases?
myahya
source share