Here is the code I'm running into an error with:

FROM
    IndexPID
    INNER JOIN Demographics ON
        IndexPID.NDoc_Number = Demographics.NDoc_Number,
    PatientSupply
    INNER JOIN Demographics ON
        PatientSupply.NDocNum = Demographics.NDoc_Number

I also tried it this way:

FROM
    IndexPID, PatientSupply
    INNER JOIN Demographics ON
        IndexPID.NDoc_Number = Demographics.NDoc_Number
    INNER JOIN Demographics ON
        PatientSupply.NDocNum = Demographics.NDoc_Number

But no cigar. Anybody tell me what I'm doing wrong?

Recommended Answers

All 3 Replies

What is the error message you are getting?

You can't really mix-and-match declarative join syntax with explicit join syntax.

So, for instance, you'd have to have each table joined to each other table like so:
...
from demographics
inner join IndexPID on IndexPID.NDoc_Number = Demographics.NDoc_Number
inner join PatientSupply on PatientSupply.NDocNum = Demographics.NDoc_Number
...

or like this:
...
FROM Demographics, IndexPID, PatientSupply
where IndexPID.NDoc_Number = Demographics.NDoc_Number
and PatientSupply.NDocNum = Demographics.NDoc_Number
...

Personally, I prefer the declarative syntax...but that's just me.

Hope this helps! Good luck

Great! Works splendid BitBit! Thank you so much!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.