|
Posted by Erland Sommarskog on 10/01/18 11:27
(michaelnewport@yahoo.com) writes:
> I see (from your example and my practice) that I can only do 1 INNER
> JOIN statement per table and the rest of the joins on that table are
> back to 'old style'. Is there a good reason for that ?
Not really sure what you mean. You can mix "old-style" and JOIN syntax
as much as you like:
FROM tbl1, tbl2,
JOIN tbl3 ON ..., tbl4
JOIN tbl5 ON ..., tbl5, tbl6
But I would not recommend that. Maybe you are thinking of:
WHERE NOT EXISTS (
select *
from dtlocal.dbo.resources e
INNER JOIN dtlocal.dbo.assignments f ON f.asgtrsrcguid = e.rsrcguid
INNER JOIN dtlocal.dbo.users h ON h.userguid = e.rsrcuserguid
INNER JOIN dtlocal.dbo.persons g ON g.persguid = h.userpersguid
where a.rsrcid = e.rsrcid and
a.rsrchqnumber = e.rsrchqnumber and
c.perslastname = g.perslastname and
c.persfirstname = g.persfirstname)
But the WHERE clause here is a filter of the subquery that refers to
rows in the outer query, so this is not a join here.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
Navigation:
[Reply to this message]
|