Query Help: Mutiple Relationships

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

    #1

    Query Help: Mutiple Relationships

    Hello. Looking for some tips, tricks or help in addressing the following issue.

    Table 1 has two columns, A and B. Column A is the Key ... column B is the name-value.

    Table 2 has many rows and has 10 Columns. Each column contains a value which I need to look against Table 1 Column A and retrieve the Table 1 Column B name-value.



    And I cannot seem to do this without laborious and repeated queries. Any tricks?
  • pietlinden@hotmail.com

    #2
    Re: Query Help: Mutiple Relationships


    Buster Chops wrote:[color=blue]
    > Hello. Looking for some tips, tricks or help in addressing the following issue.
    >
    > Table 1 has two columns, A and B. Column A is the Key ... column B is the name-value.
    >
    > Table 2 has many rows and has 10 Columns. Each column contains a value which I need to look against Table 1 Column A and retrieve the Table 1 Column B name-value.
    >
    >
    >
    > And I cannot seem to do this without laborious and repeated queries. Any tricks?[/color]

    so you're joining table 1 to table 2 on multiple fields? Not much to
    it. Add Table2 to the QBE grid, then add multiple copies of Table1
    then join as you need to. (PK--FK). Then drop in your fields you want
    to show (the name-value). you'll have to alias the lot, though...

    Comment

    • Larry Linson

      #3
      Re: Query Help: Mutiple Relationships

      "Buster Chops" wrote
      [color=blue]
      > Table 1 has two columns, A and B. Column
      > A is the Key ... column B is the name-value.[/color]
      [color=blue]
      > Table 2 has many rows and has 10 Columns. Each
      > column contains a value which I need to look against
      > Table 1 Column A and retrieve the Table 1 Column B
      > name-value.[/color]

      Piet's reply tells you how to do this with your current design, but almost
      certainly your design should be "normalized " to comply with relational
      database design principles. It appears you have 10 Columns, each
      representing the same type of information. If those were each separate Rows
      (Records, in Access Terms), you could simply query to find what Key values
      have a particular name-value. As it is, such a question is likely to require
      a laborious query structure to answer.

      Larry Linson
      Microsoft Access MVP

      And I cannot seem to do this without laborious and repeated queries. Any
      tricks?


      Comment

      Working...