DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Connect by prior wierdness

  1. #1
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204

    Connect by prior wierdness

    "connect by prior" requires a strict single parent, one or multiple child relationships.

    I have some double parent, single child relationships in a table I'm querying. I've excluded those rows in my criteria but I get an error because it doesn't like the idea that they exist (even though they're outside the criteria).

    Why is that?
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  2. #2
    Join Date
    Nov 2000
    Location
    Baltimore, MD USA
    Posts
    1,339
    Without the data, query, and error, it's a little difficult to diagnose.

    But my guess would be that you are making assumptions about the order of execution that are not true. In other words, you are assuming that the WHERE clause will be processed before the CONNECT BY, which is most likely turning out not to be the case.

    - Chris
    Christopher R. Long
    ChrisRLong@HotMail.Com
    But that's just my opinion. I could be wrong

  3. #3
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    Chris,

    Maybe you're right.

    If I subquery (select from select) the dataset with valid relationships, everything's fine. If I drop the subquery and depend on the criteria to limit the returned data, it errors saying that there is a relationship integrity problem (2 parents for 1 child).

    It doesn't make any sense to check for relationship integrity across the entire table first.
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width