A question about joins

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Galka

    #1

    A question about joins

    Hello
    I have 2 tables, each one has a Course Code field. I need to find
    courses, which are not present in one of the tables.
    It would have been very simple, but in one table Course Code can be not
    1 course code, but several, like: CBEA2B0886,CBEA 2B0887. As a result,
    if I join tables by course code field, both these courses are not
    found, when they are perfectly present.
    I know how to do this in code. My question is, is it possible to do
    without code, on query level? If yes, how? Thank you.
    Galina

  • Phil Stanton

    #2
    Re: A question about joins

    Do a query with one table joined to the other with a left join. Display the
    2 sets of codes and set the condition that table1 code Is Null
    Then do the join the other way and look for Table2 code being Null

    Phil
    "Galka" <galkas@mail.ru > wrote in message
    news:1130157390 .211102.86110@g 47g2000cwa.goog legroups.com...[color=blue]
    > Hello
    > I have 2 tables, each one has a Course Code field. I need to find
    > courses, which are not present in one of the tables.
    > It would have been very simple, but in one table Course Code can be not
    > 1 course code, but several, like: CBEA2B0886,CBEA 2B0887. As a result,
    > if I join tables by course code field, both these courses are not
    > found, when they are perfectly present.
    > I know how to do this in code. My question is, is it possible to do
    > without code, on query level? If yes, how? Thank you.
    > Galina
    >[/color]


    Comment

    • Larry Linson

      #3
      Re: A question about joins

      Do you mean you have several course codes in one record?

      If so, that would be emulating a "multi-value" field, and
      Access doesn't have a good way to query those, so a
      little table redesign might be in order

      Or do you mean you have records for several course codes in that table?

      If so, left click the join line in QueryBuilder to highlight it, then right
      click the highlighted line, and set the join properties to select a join
      type for all records from one table and those that match from the other.
      Depending on your table design, you might have to do that same kind of
      operation on a join line going in the other direction, also.

      Larry Linson
      Microsoft Access MVP



      "Galka" <galkas@mail.ru > wrote in message
      news:1130157390 .211102.86110@g 47g2000cwa.goog legroups.com...[color=blue]
      > Hello
      > I have 2 tables, each one has a Course Code field. I need to find
      > courses, which are not present in one of the tables.
      > It would have been very simple, but in one table Course Code can be not
      > 1 course code, but several, like: CBEA2B0886,CBEA 2B0887. As a result,
      > if I join tables by course code field, both these courses are not
      > found, when they are perfectly present.
      > I know how to do this in code. My question is, is it possible to do
      > without code, on query level? If yes, how? Thank you.
      > Galina
      >[/color]


      Comment

      Working...