INNER JOIN  
Author Message
TheExcelAddict





PostPosted: Tue Sep 30 16:14:33 CDT 2003 Top

SQL Server Developer >> INNER JOIN

I have this situation:

SELECT a.ID, b.Naziv, a.Naziv AS Expr2, a.Namen, c.Ime, a.Kreiran, a.Zaprt
FROM ToDos a INNER JOIN
Podjetja b ON a.PodjetjeID = b.ID

Two tables are connected. How can I connect third one? I need c.Ime field from third ( c ) table.

SQL Server248  
 
 
Anith





PostPosted: Tue Sep 30 16:14:33 CDT 2003 Top

SQL Server Developer >> INNER JOIN Do:

SELECT a.ID, b.Naziv, a.Naziv AS Expr2, a.Namen,
c.Ime, a.Kreiran, a.Zaprt
FROM ToDos a
INNER JOIN Podjetja b
ON a.PodjetjeID = b.ID
INNER JOIN third_tbl c
ON c.joincol = <a.joincol or b.joincol>

-- Use the column on which you want to join with the third table.

--
- Anith
( Please reply to newsgroups only )