Syntax for nest JOIN in MS Access?

mike1reynolds

New member
Local time
Today, 05:45
Joined
Feb 22, 2008
Messages
5
This query works:

SELECT p.AcntNumber, p.Name, d.FromDate
FROM Daysheet AS d
INNER JOIN Patient AS p ON d.AcntNumber=p.AcntNumber

But this does not:

SELECT p.AcntNumber, p.Name, d.FromDate, c.CPT
FROM Daysheet AS d
INNER JOIN Patient AS p ON d.AcntNumber=p.AcntNumber
INNER JOIN Charge AS c ON c.Id=d.ChargeNum

Nor this:

SELECT p.AcntNumber, p.Name, d.FromDate, c.CPT
FROM Daysheet AS d
(INNER JOIN Patient AS p
(INNER JOIN Charge AS c ON c.Id=d.ChargeNum)
ON d.AcntNumber=p.AcntNumber)

How do you word a nested join?
 
Mike,

Code:
SELECT p.AcntNumber, p.Name, d.FromDate, c.CPT
FROM   Daysheet AS d INNER JOIN Patient AS p[B] ON [/B]
         d.AcntNumber = p.AcntNumber INNER JOIN Charge AS c ON 
           c.Id = d.ChargeNum

Wayne
 
See below (note the placement of the parenthesis):
Code:
SELECT p.AcntNumber, p.Name, d.FromDate, c.CPT
FROM (Daysheet AS d
INNER JOIN Patient AS p ON d.AcntNumber=p.AcntNumber)
INNER JOIN Charge AS c ON c.Id=d.ChargeNum
 

Users who are viewing this thread

Back
Top Bottom