Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can recursion handle this?
Message
From
02/05/2007 08:28:31
 
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01221573
Message ID:
01221748
Views:
14
Viv,
I think the design is wrong. Put the difference between parts and components at the highest level (Component) and the problem is solved. I would suggest to change te design like this :
Only 2 tables : Component (or call it Product or whatever) and ComponentList
The field ItemIsPart sould be placed in the table Component.
Component:
Id     Name             IsPart
1      Car              False
2      Wheel Assembly   False
3      Grey Paint       False
4      Grey Car         False
7      Tyre             True
8      Wheel Hub        True
9      Engine           True
10     Bolt             True
11     White Paint      True
12     Black Paint      True

ComponentList:
Id     Uses     Quan   
1      9          1    
1      2          4       
2      8          1       
2      7          1       
2      10         4       
3      11         .9      
3      12         .3      
4      3          1.2     
1      10         1023   
4      1          1       
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform