Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Connect By hierarchy problem

Re: Connect By hierarchy problem

From: Mike C <michaeljc70_at_hotmail.com>
Date: 17 Oct 2006 09:41:05 -0700
Message-ID: <1161103265.370879.290800@m73g2000cwd.googlegroups.com>

On Oct 17, 11:16 am, "Michel Cadot" <micadot{at}altern{dot}org> wrote:
> "Mike C" <michaelj..._at_hotmail.com> a écrit dans le message de news: 1161101088.270321.218..._at_i3g2000cwc.googlegroups.com...
>
> On Oct 17, 10:54 am, "Michel Cadot" <micadot{at}altern{dot}org> wrote:
>
>
>
> > "Mike C" <michaelj..._at_hotmail.com> a écrit dans le message de news: 1161097500.469229.311..._at_m7g2000cwm.googlegroups.com...
> > |I have a simple table with a hierarchical structure:
> > |
> > | CREATE TABLE relation (parent_id number, child_id number);
> > |
> > | INSERT INTO relation values (10,3);
> > | INSERT INTO relation values (3,2);
> > | INSERT INTO relation values (2,1);
> > | INSERT INTO relation values (10,5);
> > | INSERT INTO relation values (14,11);
> > | INSERT INTO relation values (11,17);
> > |
> > | I need to a query to return a results that lists every child and it's
> > | direct and not direct parent (it's parents parent and so on), Having
> > | the level would be nice too For example, I want this back:
> > |
> > | Parent_id Child_id
> > |
> > | 10 3
> > | 3 2
> > | 10 5
> > | 14 11
> > | 11 17
> > | 10 2
> > | 14 17
> > | 2 1
> > | 3 1
> > | 10 1
> > |
> > | I can't seem to get CONNECT BY to do this.
> > |
>
> > You seem to not progress since your last question on hierarchical query. :o)
> > All what you need is in the previous answers.
> > I remind you your post subject if you want to search on Google:
> > "Summing hierarchical data SQL"
>
> > Regards
> > Michel CadotI really don't know why you would waste your itme and others posting
> useless help, There is a lot of information in that other post. If I
> knew how to do it, I wouldn't waste my time posting here. It is a
> different problem if you look at it closely, Maybe you shoudl spend
> your time in chat rooms or something as it seems like you are just
> killling time.
>
> -------------------------------------------
>
> Different question, same tools to solve.
> Sorry but you don't carefully read the answers if you think
> you can't get the solution with them.
> As it is a basic question I don't post the answer just clues.
> If you read my other posts, you'd see when the questions are
> complex I post solutions.
> Moreover, if you posted what you already tried, I'd correct it.
> Once again reread your previous post and associated answers
> and you see I gave you the plain solution.
>
> I'm not killing time, I'm just wasting mine trying to help you to learn
> how to write a SQL query.
>
> Regards
> Michel Cadot

What is "basic" to you, may not be basic to everyone. People reading this newsgroup are of all levels- it is not called "comp.databases.oracle.experts". I have done consulting and SQL for 12 years. I never used Connect by (they are fairly new) and didn't relate to the work I did. I can tell you, 90% of the consultants and people I come across that do Oracle, would not be able to figure out this problem easily. Received on Tue Oct 17 2006 - 11:41:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US