Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
teamjai
Yak Posting Veteran
52 Posts |
Posted - 2014-08-25 : 02:43:22
|
1)Table Name - Segementation- ID (primary Key)- Producttype- Material2) Table name- Btype-ID (primary Key)-Bcode3)Table name - SegmentBrelationship-Id (primary key)-SegID (Foreign key) (from Table Segmentation)-BTID (Foreign key) (from Table -Btype)-Materiali need joined SQL query with following tables and fields would be needed for helping to cross check whether all correct materials are assigned. My querySelect ID, ProductType,Material from segementation..Here i need to check the BTID and Material from btype & SegmentBrelationship table..Could you please help me. Thanks. |
|
djj55
Constraint Violating Yak Guru
352 Posts |
Posted - 2014-08-25 : 14:50:18
|
[code]select Seg.* from Segementation Seg INNER JOIN SegmentBrelationship SBR ON Seg.ID = SBR.SegIDINNER JOIN Btype BT ON BT.ID = SBR.BTID[/code]This is not the answer but an example to help you find the answer.djj |
|
|
|
|
|