Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

hierarchical query...

436909Sep 1 2005 — edited May 24 2006
Hi,

I am trying out a hierarchical query in the following example: in v$dependecies you find can find all objects that are dependant from any other object. I have to know the hierarchy of dependancies in order to recompile my packages in the right way, after having compiled one package.

So I begin with one specific package from the field "referenced_name" and find all dependant objects in the field "name". Then I have to take every one of those objects, look for them in the field "referenced_name" and find out the objects that are dependant from them.

I tried to solve this with a hierarchical query, like that:

select referenced_name, level
from user_dependencies
start with referenced_name=<Package-name whose dependencies I want to explore>
connect by prior referenced_name = name

Oracle answers to this with "ora-01436: connect by loop in user data"

Why? What I intend to do certainly does not contain an infinite loop. Can I use the hierarchical query here?

Thanks in advance,

Xenofon
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 21 2006
Added on Sep 1 2005
9 comments
1,125 views