Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to get all Childs and subchilds of a parent Expand / Collapse
Author
Message
Posted Wednesday, February 13, 2013 9:11 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, February 14, 2013 2:25 AM
Points: 3, Visits: 9
Hi All,

I need an urgent help to build some logic in Oracle DB.

I have a table called TREE and in that we have data based on hierarchies.
We have columns like DataID and ParentID and DataID column is unique one.

And the data for DataID and ParentID will be this is like parent and child relation ship.
I need to get the count of all DataID's and Sub-dataID's of ParentID.

I need to get the count of this without using Start With connect by option.

Is there a way to get this done...

Thanks
Anilkumar B
Post #1419600
Posted Wednesday, February 13, 2013 9:30 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 3:28 PM
Points: 13,103, Visits: 11,933
anilkumar04_b (2/13/2013)
Hi All,

I need an urgent help to build some logic in Oracle DB.

I have a table called TREE and in that we have data based on hierarchies.
We have columns like DataID and ParentID and DataID column is unique one.

And the data for DataID and ParentID will be this is like parent and child relation ship.
I need to get the count of all DataID's and Sub-dataID's of ParentID.

I need to get the count of this without using Start With connect by option.

Is there a way to get this done...

Thanks
Anilkumar B


Welcome to SSC. There is no way we can help with the limited amount of information you have posted. We would need to see ddl (create table scripts) and sample data (insert statements) in addition to desired output. Please take a few minutes to read the article found at the first link in my signature for best practices when posting questions.


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1419614
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse