Home » RDBMS Server » Server Administration » Need help constructing SQL query
Need help constructing SQL query [message #371928] Thu, 21 December 2000 15:49 Go to next message
alok
Messages: 12
Registered: December 2000
Junior Member
In a tree stucture such as this

Root Node
|-- Node1--|Node1.1
|Node 1.2
|
|---Node2

Root Node (Node1 & Node 2 are children)
Node1 (Node1.1, Node 1.2 are children)
Node2 does not have children

How do I get all nodes under Root Node who don't have children of their own

i.e, in the above case with the root node it should return only Node2.

NODES TABLE
----------
NODE | PARENT_NODE <-- columns
~~~~~~~~~~~~~~~~~~~~~~~
Root Node NULL
Node1 Root Node
Node2 Root Node
Node1.1 Node1
Node1.2 Node1
Node2 NULL
Re: Need help constructing SQL query [message #371929 is a reply to message #371928] Thu, 21 December 2000 15:56 Go to previous messageGo to next message
alok
Messages: 12
Registered: December 2000
Junior Member
I worked out the answer myself..
Thanks
Re: Need help constructing SQL query [message #371933 is a reply to message #371929] Fri, 22 December 2000 05:21 Go to previous message
Marcus Fernando
Messages: 34
Registered: September 2000
Member
Can you give me your solution to this query. I'm have the same case.
Thanks.
Previous Topic: Re: How do I know from unix prompt Oracle instance status
Next Topic: Formatting Text fields
Goto Forum:
  


Current Time: Fri May 17 08:58:22 CDT 2024