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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Hierarchical Hell - traversing up the tree?

784546Jul 16 2010 — edited Jul 16 2010
Still struggling with hierarchical queries here. My assignment was originally to identify "last nodes" whose object_type_id is something other than a 29. You guys helped me do that with the connect_by_isleaf>0 clause, so my SQL is now:

select distinct p.parent_id, lpad(' ',level*2) || p.id, p.object_type_id
from product p
where p.country_id='GBR'
and connect_by_isleaf>0
and p.object_type_id != 29
start with p.id=2173952 -- that's the top of the hierarchy
connect by p.parent_id = prior p.id
order by 1,2;

My next assignment is: For these "last nodes", to traverse back up the tree to see if any of their predecessors have other children (or grand-children, or great-grandchilren etc.) who DO end in an object_type_id = 29.

The result set of these "last nodes" varies as to how deep it is - everything from level 6 thru level 9 (and could conceivably go deeper in the future, so needs to be dynamically scalable).

I could do this the stupid way - define a cursor that identifies the level, and then use that level to keep going backwards. But that's going to be really intensive esp. as data volume grows and I'm wondering if there's a smarter, more efficient way to go about this?

Thanks in advance for your help.

Comments

Answer

Likely your application is coded to change the mouse pointer to "busy" and you are not setting back to the default.  Example:

SET_APPLICATION_PROPERTY (CURSOR_STYLE, 'BUSY');

It is also possible (although unlikely) that there is a Java bug causing this.  Unfortunately because you are using Forms 10 (obsolete for many years) you really don't have many options to upgrade Java versions.  Also, if you are not already using a patched version of Forms 10 (10.1.2.3), I recommend doing so.

I would be interested in knowing if the same reproduced in version 12.2.1.2 using the latest Java version (8u144).

Marked as Answer by user501532 · Sep 27 2020
user501532

Thx. The aplication property worked fine.

1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 13 2010
Added on Jul 16 2010
11 comments
5,212 views