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 |
MikeB
Constraint Violating Yak Guru
387 Posts |
Posted - 2002-08-20 : 10:44:18
|
Is it possible to join more then 2 tables?If so, can someone help me out with how to do this?I have the following tablesTable1:ProjectID | ComponentID | ShippingDate | LoadNumberTable2:ComponentID | Length | Width | WeightTable3:ComponentID | Length | Width | Weight |.....|.....|.....| Now I know what you are going to say. "Table2 and Table3 look thesame why not just make them one?". The two tables are entirelydifferent in the sence that they deal with totally different Componenttypes and are populated using 2 very different applications.I am only trying to tie them together for the shipping componentof my applcation. They are, however, in the same database. The trick is that one load can have both components on it.Is there any way to do this?Mike BEdited by - MikeB on 08/20/2002 10:46:16 |
|
LarsG
Constraint Violating Yak Guru
284 Posts |
Posted - 2002-08-20 : 11:11:18
|
select * from (table1 inner join table2 on table1.componentid = table2.componentID) inner join table3 on table2.componentid = table3.componentIDThe use of parentheses is specific to Access. If you have more tables, just add parenteheses in the same manner. (There is some sort of query wizard in Access that can be used for this purpose. No personal experience, just hearsay.) |
 |
|
|
|
|