SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

lchavez
Starting Member

Mexico
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

USA
1770 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  
 New 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.05 seconds. Powered By: Snitz Forums 2000