An update query?

  • Thread starter Thread starter Heather
  • Start date Start date
H

Heather

Is there a way to do this? I have 2 tables one is by the
week and the other is ytd. The table are results from a
qry the selects the Top 5 moneymakers by ID for the week
and also by YTD. I want to join the 2 tables so it looks
like below. The common element is the ID field. So the
data could be;

Week Ytd
Date id Terr amount id Terr Amount
6/19/04 12 A 1 12 B 12
6/19/04 11 C 2 12 C 50

Note see how in the week I have Terr A & C but the YTD I
have B & C.. It is causing tons of duplications. Thats is
because by week I might have Terr that are doing great
like A & C & D but YTD Terr would be B & C & D. So the
top five weekly might not be the top 5 YTD..
 
Heather said:
Is there a way to do this? I have 2 tables one is by the
week and the other is ytd. The table are results from a
qry the selects the Top 5 moneymakers by ID for the week
and also by YTD. I want to join the 2 tables so it looks
like below. The common element is the ID field. So the
data could be;

Week Ytd
Date id Terr amount id Terr Amount
6/19/04 12 A 1 12 B 12
6/19/04 11 C 2 12 C 50

Note see how in the week I have Terr A & C but the YTD I
have B & C.. It is causing tons of duplications. Thats is
because by week I might have Terr that are doing great
like A & C & D but YTD Terr would be B & C & D. So the
top five weekly might not be the top 5 YTD..
Hi Heather,

I'm a little confused by use of "table/query"..

"Week" (which is a reserved word, as is "Date"
and you should probably change them) and "Ytd" are
queries?

I might include a "Rank" in the separate queries,
then join by "Rank."

Include SQL for your 2 queries (make tables?)
if you would like help with calculating "Rank".

Of course, I may have completely misunderstood
what you are trying to do...
 
Back
Top