Home » SQL & PL/SQL » SQL & PL/SQL » fetch Last child using connect by (oracle 9i)
fetch Last child using connect by [message #399510] Wed, 22 April 2009 11:52 Go to next message
techluver
Messages: 16
Registered: May 2006
Junior Member
If I just want to fetch all last child in the structure described in http://www.orafaq.com/node/2038, how can i do that?
Please help.
Thanks

[Updated on: Wed, 22 April 2009 12:12] by Moderator

Report message to a moderator

Re: fetch Last child using connect by [message #399512 is a reply to message #399510] Wed, 22 April 2009 12:14 Go to previous messageGo to next message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Leaves are rows that are not parent.
You don't need "connect by" unless you want to start from a specific parent.

Post a working Test case: create table and insert statements along with the result you want with these data.

Regards
Michel
Re: fetch Last child using connect by [message #399517 is a reply to message #399510] Wed, 22 April 2009 12:56 Go to previous messageGo to next message
techluver
Messages: 16
Registered: May 2006
Junior Member
Thanks Michael for the reply.
Leaves are rows that are not parent.
You don't need "connect by" unless you want to start from a specific parent.
- Can I fetch last leave without connect by? can u pls give me sample sql for this data structure http://www.orafaq.com/node/2038?

Thanks again.
Re: fetch Last child using connect by [message #399524 is a reply to message #399517] Wed, 22 April 2009 13:40 Go to previous message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Leaves are employees (empno) that are not manager (mgr).

Regards
Michel
Previous Topic: ult_smtp and message format
Next Topic: how to set 'sessions_per_user' ?
Goto Forum:
  


Current Time: Wed Dec 07 18:16:25 CST 2016

Total time taken to generate the page: 0.12406 seconds