Results 1 to 1 of 1
  1. #1
    Join Date
    May 2011

    Question Unanswered: Outer Join more than two tables in MS Query

    I have 3 tables in my MS query and I need to do an outer join one one them as I need all records in that table that meet my condition, but they don't all live in the one of the other 2 tables. In MS Query it doesn't allow an outer join on 3 or more tables... grrr...

    So I've been reading some few forums and it does seem possible but you have to do it as straight SQL code and can't use the graphical representation... Which is fine... so I rewrote the SQL and did get results back... BUT I didn't get all the tables from the outer join -- I'm thinking something must be wrong with my syntax -- if anyone could help this would be FANTASTIC!!!

    Here is the code:

    , invdine.invoice
    , sales.status
    , invdine.ship
    , invdine.dinecode
    , invdine.seating
    , invdine.tableid
    , invdine.dateInvited
    , invdine.invitedBy
    , invdine.confirmed
    , invdine.dateRequested
    , invdine.Sharing
    , invdine.Partysize
    FROM PROD.dbo.invdine AS invdine
    JOIN PROD.dbo.Pax AS Pax
    ON Pax.INVOICE = invdine.INVOICE
    JOIN PROD.dbo.Sales AS Sales
    ON Sales.INVOICE = invdine.invoice
    WHERE sales.GCONTRACT='C166166'

    My Tables are Sales, Pax, and Invdine
    I need all records from Sales that have a GCONTRACT = C166166

    Last edited by KimCruise; 05-18-11 at 10:44.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts