Re: query joints.

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Duane Hookom (duanehookom_at_NO_SPAMhotmail.com)
Date: 02/12/04


Date: Wed, 11 Feb 2004 20:05:32 -0600

The most efficient method would be to normalize your tables. Your table 1
would look like:
   ID
   GroupNumber
   TheValue

Your second table would look like:
   ID
   GroupNumber
   GroupFactor
   AnotherValue

-- 
Duane Hookom
MS Access MVP
"WH" <anonymous@discussions.microsoft.com> wrote in message
news:de6301c3f0af$761a8b60$a101280a@phx.gbl...
> I have two tables, table 1 contains many records, each
> record has its own "group1 number", "group2
> number", "group3 number".
> It looks like:
>
> ID   group1_number group2_number group3_number
> 1        2                1              3
> 2        5                2              2
> etc..
>
> table 2 looks like this:
>
> "GROUP #"  "group1 factor"  "group2 factor" "group3 factor"
>  1           0.1               0.2            0.68
>  2           0.69              0.36           0.33
>  3           some other factors....
>  4
>  5
>  6           0.22              0.33           0.39
> etc.
>
> Now for each record in table1, I need to get its group1
> factor, group2 factor, and group3 factor.
>
> For example, a record has group1 number=2 group2 number=1
> group3 number=6. I would want to go into table 2, and
> return group1 factor = 0.69, group2 factor=0.2, group3
> factor=0.39.
>
> How should I do this most efficient?
>
> Thanks a lot for any help.
>
> WH