Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Help with complex code
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 05/14/2013 :  11:00:53  Show Profile  Reply with Quote
Hello. I'd appreciate help with a bit of code that can help me retreive data from one table in my DB.

The issue here is that on the same table I have a bill of materials that contains the part numbers of the parent part and the child parts. One same part number can have several child parts which in turn can each have more child parts.

I managed to get the information in an 'indented' form, but I need a 'summarized' form, meaning that instead of having the information horizontally, I need to retreive it vertically, so I can see the whole bill of materials in a simple manner: Parent part first (with quantities), child parts after and 'grandchilds' after that (if any).

I hope someone can help me out with this.

Thank you very much in advance.

Lenar C.

Bustaz Kool
Flowing Fount of Yak Knowledge

1834 Posts

Posted - 05/14/2013 :  11:20:51  Show Profile  Reply with Quote
Not sure what you actually want. Pretty sure that having the table definition, sample data and expected output would help.

I am not one of those who in expressing opinions confine themselves to facts. (Mark Twain)
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000