Oracle Error ORA-19036: Invalid query result set in newContextFromHierarchy()

Oracle Error Message

ORA-19036: Invalid query result set in newContextFromHierarchy()

Reason for the Error

The result set of the query used in the newContextFromHierarchy() does not have the same property as the result set generated by a CONNECT BY query.

Solution

Make sure the query used in newContextFromHierarchy() is a CONNECT BY query or the query returns the result set have the same property as the result set generated by a CONNECT BY query.