Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can recursion handle this?
Message
De
02/05/2007 08:28:31
 
 
À
01/05/2007 13:23:54
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01221573
Message ID:
01221748
Vues:
10
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       
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform