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 |
Lainkes
Starting Member
3 Posts |
Posted - 2008-02-04 : 09:33:09
|
Hey,I have following tables :Person : P_ID, ... (contains person information).Dossier : P_ID, DOS_ID, ... (contains dossier information).Each person can have more than 1 dossier.Test : DOS_ID, .... (test information). each dossier has 1 corresponding test record.I want to make a query that returns for each person all test dossiers.Any idea how I can do that?Thanks in advanceGreetingsLainkes |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-02-04 : 09:38:17
|
SELECT *FROM Person pINNER JOIN Dossier dON d.P_ID=p.P_IDINNER JOIN Test tON t.DOS_ID=d.DOS_ID |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-02-04 : 09:39:18
|
Also make sure to specify required columns in the select statementMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|