Results 1 to 2 of 2

Thread: Customizing SQL statement in Access

  1. #1
    Lou Thompson Guest

    Customizing SQL statement in Access

    Here a query built in Access that works, but I need some of the tables as OUTER JOINs as oppose to INNER JOINS but the query builder is not giving me the options, and defaults all as INNER JOINS:

    SELECT
    airlines.c_ID,
    airlines.Carrier,
    CODES.CODE,
    ConMain.airline AS ConMain_airline,
    ConMain.d_From,
    ConMain.d_To,
    ConMain.Period,
    ConMain.Fare,
    ConMain.Type,
    ConMain.Class,
    ConZones.Zone,
    ConZones.cities,
    conSeasons.Airline AS conSeasons_Airline,
    conSeasons.Season,
    conSeasons.p_Start,
    conSeasons.p_End,
    CODES.CITY

    FROM ((ConZones INNER JOIN CODES
    ON ConZones.cities = CODES.CODE)
    INNER JOIN (ConMain
    INNER JOIN conSeasons
    ON ConMain.Period = ConSeasons.Season)
    ON CODES.CODE = ConMain.d_From)
    INNER JOIN airlines
    ON ConMain.airline = airlines.c_ID


    My question is only in reference to 'my query' where I have like 4 nested joins, and were build originally with the Access query wizard, but I got no options to choosee from INNER JOINS to OUTER JOINS, they were all INNER joins.

    What I need now is some of the tables only INNER and some OUTER, I tried to do it manually but I got an error.

    Can anyone tell me how to moify my query manually?

    Or, maybe that's too much to ask... Can anyone just tell me how to customize LEFT OUTER or RIGHT OUTER in the query wizard of access?




  2. #2
    TracyF Guest

    Customizing SQL statement in Access (reply)

    I don't know about changing the joins in the query wizard, but you can change the join type from the query design grid. Double-click on the join line, and you will be presented with three options. They are not labeled as inner and outer joins, but if you read the 3 descriptions, you'll see how it will create outer joins for you.


    ------------
    Lou Thompson at 5/11/01 7:23:33 AM

    Here a query built in Access that works, but I need some of the tables as OUTER JOINs as oppose to INNER JOINS but the query builder is not giving me the options, and defaults all as INNER JOINS:

    SELECT
    airlines.c_ID,
    airlines.Carrier,
    CODES.CODE,
    ConMain.airline AS ConMain_airline,
    ConMain.d_From,
    ConMain.d_To,
    ConMain.Period,
    ConMain.Fare,
    ConMain.Type,
    ConMain.Class,
    ConZones.Zone,
    ConZones.cities,
    conSeasons.Airline AS conSeasons_Airline,
    conSeasons.Season,
    conSeasons.p_Start,
    conSeasons.p_End,
    CODES.CITY

    FROM ((ConZones INNER JOIN CODES
    ON ConZones.cities = CODES.CODE)
    INNER JOIN (ConMain
    INNER JOIN conSeasons
    ON ConMain.Period = ConSeasons.Season)
    ON CODES.CODE = ConMain.d_From)
    INNER JOIN airlines
    ON ConMain.airline = airlines.c_ID


    My question is only in reference to 'my query' where I have like 4 nested joins, and were build originally with the Access query wizard, but I got no options to choosee from INNER JOINS to OUTER JOINS, they were all INNER joins.

    What I need now is some of the tables only INNER and some OUTER, I tried to do it manually but I got an error.

    Can anyone tell me how to moify my query manually?

    Or, maybe that's too much to ask... Can anyone just tell me how to customize LEFT OUTER or RIGHT OUTER in the query wizard of access?




Posting Permissions

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