1 2 Previous Next 17 Replies Latest reply: Feb 26, 2012 2:02 PM by 403100 Go to original post RSS
      • 15. Re: summerize accoding to all leves in herarchial table
        Frank Kulash
        user400097 wrote:
        what is CONNECT_BY_ROOT? I get an error that this is invalid identifier
        CONNECT_BY_ROOT is an operator which gets a value from the first level of the hierarchy, similar to how PRIOR gets a value from the previous level. For more, see the SQL language manual:
        CONNECT_BY_ROOT was introduced in Oracle 10.1. Have you clearly said what version of Oracle you're using? There's a tag "9i" on your first message, but, as you've demonstrated, that's not nearly as clear as saying something like "I'm using Oracle" in the body of your message.
        In Oracle 9, you can get the same results as CONNECT_BY_ROOT by using SYS_CONNECT_BY_PATH. The text between the 1st 2 delimiters is what SYS_CONNECT_BY_ROOT would return.

        For your latest problem, please post CREATE TABLE and INSERT statemenrts for your new sample data (like Stew did for your earlier sample data), and the results you want from that data.
        See the Forum FAQ
        for how to post a question.
        • 16. Re: summerize accoding to all leves in herarchial table
          Stew Ashton
          Thanks, Frank. I saw that "9i" tag and forgot about it when adding CONNECT_BY_ROOT to my solution.

          I'm confused by the OP's last post: my second solution doesn't need the extra row any more. I regret posting a first version that required the extra row: that was a short cut that did more harm than good.
          • 17. Re: summerize accoding to all leves in herarchial table
            Thank you all for your replies.
            Sorry if my post wasn't so clear.
            I used Solomon Yakobson at the end cause it was more easier for me to implement it. (At the beginning, your way was good, but when I needed to add additionnal column to the select, it become more complex in your way)

            Anyway, I thank you all for your effort. I really aprechiate it.


            PS, I take your advise, and add the version of Oracle I use in the body of the post, and not only on tags
            1 2 Previous Next