Start With Connect by usage without Prior keyword

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Christian

    Start With Connect by usage without Prior keyword

    HI,
    Is there a usage for something like this:

    Select MyColumn
    From MyTable
    Start with MyCol = aNumber
    Connect By MyCol = MyOtherCol

    If not, its a bit weird that Oracle does not raise an error since the
    keyword PRIOR is not used like this:

    Select MyColumn
    From MyTable
    Start with MyCol = aNumber
    Connect By Prior MyCol = MyOtherCol

    Thank you,
    Christian Cote
  • Mark C. Stock

    #2
    Re: Start With Connect by usage without Prior keyword


    "Christian" <ccote_msl@yaho o.comwrote in message
    news:992a9b5a.0 406080846.6ad36 d37@posting.goo gle.com...
    | HI,
    | Is there a usage for something like this:
    |
    | Select MyColumn
    | From MyTable
    | Start with MyCol = aNumber
    | Connect By MyCol = MyOtherCol
    |
    | If not, its a bit weird that Oracle does not raise an error since the
    | keyword PRIOR is not used like this:
    |
    | Select MyColumn
    | From MyTable
    | Start with MyCol = aNumber
    | Connect By Prior MyCol = MyOtherCol
    |
    | Thank you,
    | Christian Cote

    no reasonable usage that i can see, but it does appear that the where-as the
    syntax is not checked, any statement that leaves out the PRIOR (cannot leave
    out the CONNECT BY) will either return no rows or will raise 'ORA-01436:
    CONNECT BY loop in user data'

    ++ mcs


    Comment

    • Mikito Harakiri

      #3
      Re: Start With Connect by usage without Prior keyword

      "Mark C. Stock" <mcstockX@Xenqu ery .comwrote in message news:<_uGdnQE3w rDO20zd4p2dnA@c omcast.com>...
      "Christian" <ccote_msl@yaho o.comwrote in message
      news:992a9b5a.0 406080846.6ad36 d37@posting.goo gle.com...
      | HI,
      | Is there a usage for something like this:
      |
      | Select MyColumn
      | From MyTable
      | Start with MyCol = aNumber
      | Connect By MyCol = MyOtherCol
      |
      | If not, its a bit weird that Oracle does not raise an error since the
      | keyword PRIOR is not used like this:
      |
      | Select MyColumn
      | From MyTable
      | Start with MyCol = aNumber
      | Connect By Prior MyCol = MyOtherCol
      |
      | Thank you,
      | Christian Cote
      >
      no reasonable usage that i can see, but it does appear that the where-as the
      syntax is not checked, any statement that leaves out the PRIOR (cannot leave
      out the CONNECT BY) will either return no rows or will raise 'ORA-01436:
      CONNECT BY loop in user data'
      select rownum from dual connect by rownum < 100

      I'm not sure about the earlier versions but since 9.2 it certainly
      won't give you 'ORA-01436'.

      Comment

      Working...