Link to home
Create AccountLog in
Avatar of TomBalla
TomBallaFlag for United States of America

asked on

sql server one to many

I have two tables I need to relate.  In table A, we have part#1, part#2, and part#3.  In table B, we just have part#.  How should I go about connecting these tables?  Table A has 3 different part fields in case the user needs to use 3 parts.  Table B has the part#, part description, and Qty on hand.
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
If you are reluctant to change your design then you can create a view and can use joins or union all as per your requirement and design.
So, main thing is on what basis you will join? That should be coming from your side. Check the values what will link in both the tables.
And yes, if you can manage to give resource and design changes, you should consider the expert's advice to do some normalization. If not than another experts advice of creation of view is also good.