Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Flattening a time-based tree structure
Hi all
I have to develop a job for transforming a hierarchy of users of the form:
USER
(where valid_from valid_thru specifies the time interval the parent_user_id was the parent of user_id, but gives no warranty about the upper levels in the hierarchy)
into a "flat" structure like this:
USER_HIERARCHY
level_n_user_id valid_from valid_to
There are about 10 millions records in the user TABLE and, unfortunately, I can't use CONNECT BY clause, because at some moment, the user U1 is the parent of user U2 and at another moment, the user U2 is the parent of user U1.
The Oracle version I'm using is Oracle 9.2.0.5.
Thanks,
Catalin
Received on Mon Aug 08 2005 - 10:21:56 CDT