QUERY

  • Thread starter igg via AccessMonster.com
  • Start date
I

igg via AccessMonster.com

any query to get from tableA to tableB?.

tableA:
author titlea titleb vol1 sold count date share comment
a b c 10 5 8 datea 10
a b c 10 15 8 datea 12


5+15=20
(10+12)/2=11

TableB:
titlea vol1 sum(sold) count date avg(share) comment
a 10 20 8 datea 11
 
J

John Spencer

You would use a totals query to do this but I'm not sure what you are doing
with some of your fields.

SELECT TitleA, Vol1, Sum(Sold), [Count], [Date], Avg(Share), Comment
FROM TableA
GROUP BY TitleA, Vol1,[Count], [Date], Comment

To build this query in query design view
== Add the table
== add the fields you want to see
== Select View: Totals from the menu
== Change GROUP BY to Sum under the sold field and avg under the Share field


John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top