Hierarchical Query

Hierarchical Query

 

  

Hi Gurus,
No, this isn't junk mail, but it is a little tough to explain. I have an
issue with a piece of code in our ETL program that attempts to flatten a
hierarchy. The code takes a table that looks like this (let's call it
Table A):

POLICY_NO POLICY_RENEWED_TO
123 124
124 125
125 126
126 127

...and turns it into a table that looks like this (Let's call it Table
B):

PARENT CHILD
123 123
123 124
123 125
123 126
123 127

The ETL program is choking due to a circular reference error. I can only
guess that this means that a policy was renewed back to a policy that
already existed. Has anyone seen anything like this, and how would I
query Table A to determine if this is the case? For some reason I can't
wrap my brain around the SQL.

**********************************************************************
NOTICE:
This e-mail, including attachments, contains information that may be confidential, protected by the attorney/client or other privileges, or exempt from disclosure under applicable law. Further, this e-mail may contain information that is proprietary and/or constitutes a trade secret. This e-mail, including attachments, constitutes non-public information intended to be conveyed only to the designated recipient(s). If you are not an intended recipient of this communication, please be advised that any disclosure, dissemination, distribution, copying, or other use of this communication or any attached document is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by reply e-mail and promptly destroy all electronic and printed copies of this communication and any attached documents. 

**********************************************************************


Oracle LazyDBA home page