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.

 All Forums
 Other Forums
 MS Access
 nested INNER JOINs

Author  Topic 

lisa
Starting Member

1 Post

Posted - 2001-05-15 : 19:51:12
I understand the nested INNER JOIN clauses in the nested INNER JOINs article (http://www.4GuysFromRolla.com/webtech/050599-1.shtml), but can someone please explain the multiple parentheses in the WHERE clause?

SELECT Merchandise.Description, Users.Name
FROM Users INNER JOIN (
Sales INNER JOIN (
Merchandise INNER JOIN Types
ON Merchandise.TypeID = Types.TypeID)
ON Sales.MercID = Merchandise.MercID)
ON Users.UserID = Sales.BuyerID
WHERE (((Types.TypeID) = 1))

Why can't I use this instead?

SELECT Merchandise.Description, Users.Name
FROM Users INNER JOIN (
Sales INNER JOIN (
Merchandise INNER JOIN Types
ON Merchandise.TypeID = Types.TypeID
WHERE Types.TypeID = 1)
ON Sales.MercID = Merchandise.MercID)
ON Users.UserID = Sales.BuyerID

TIA
   

- Advertisement -