|
|
Re: connect by loop in user data [message #261176 is a reply to message #261143] |
Wed, 22 August 2007 01:50   |
ramabhupalrr
Messages: 69 Registered: July 2005 Location: India
|
Member |
 
|
|
Hi ,
Thanks You for the response.
But i am expecting the following output from the above query without using inline view and i heard the that inlinve views not good at performance.
cockpit_id hrrchy_id parent_id
1 1
1 2 1
1 3 2
is the hierarchy codition runs before where clause?
Thank you,
Ram.
[Updated on: Wed, 22 August 2007 02:00] by Moderator Report message to a moderator
|
|
|
|
|
|
Re: connect by loop in user data [message #261522 is a reply to message #261143] |
Wed, 22 August 2007 23:09  |
ramabhupalrr
Messages: 69 Registered: July 2005 Location: India
|
Member |
 
|
|
Hi Michel,
thank you for your support.
This is my work on connect by.
SQL> select * from cockpit_test;
COCKPIT_ID HRRCHY_ID PARENT_ID
---------- ---------- ----------
1 1
1 2 1
1 3 2
1 4
1 5 4
2 6 1
2 3 2
2 1
8 rows selected.
SQL> select * from cockpit_test
start with hrrchy_id=1 connect by prior hrrchy_id=parent_id and cockpit_id=1;
COCKPIT_ID HRRCHY_ID PARENT_ID
---------- ---------- ----------
1 1
1 2 1
1 3 2
2 1
1 2 1
1 3 2
SQL> select * from cockpit_test
start with hrrchy_id=1 and cockpit_id=1 connect by prior hrrchy_id=parent_id and cockpit_id=1;
COCKPIT_ID HRRCHY_ID PARENT_ID
---------- ---------- ----------
1 1
1 2 1
1 3 2
SQL>
Thanks,
Ram.
[Updated on: Thu, 23 August 2007 01:09] by Moderator Report message to a moderator
|
|
|