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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-06-04 : 08:12:45
|
| Stuart writes "I have three related tables. I understand how to construct an Inner Join along the lines of table1 inner join table2 on table1 inner join table3 on table2 ......But how do you construct table1 inner join table2 on table1 inner join table3 on table1 ......i.e the relationship is 1 to 2, 1 to 3 NOT 1 to 2, 2 to 3hope this makes sense" |
|
|
Nazim
A custom title
1408 Posts |
Posted - 2002-06-04 : 08:34:25
|
| table1 t1 inner join table2 t2on t1.pkey=t2.pkeyinner join table3 t3on t1.pkey=t3.pkey-------------------------------------------------------------- |
 |
|
|
davy_boy2000
Starting Member
28 Posts |
Posted - 2002-06-04 : 08:36:15
|
| SELECT TAB1.TAB1_idFROM TAB1 INNER JOIN (TAB2 INNER JOIN TAB1 ON TAB2.TAB2_id = TAB1.TAB1_TAB2) ON TAB3.TAB3_id = TAB1.TAB1_TAB3Is this what you mean? |
 |
|
|
|
|
|