A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

QUERY



 
 
Thread Tools Display Modes
  #1  
Old March 6th, 2010, 08:35 AM posted to microsoft.public.access.queries
igg via AccessMonster.com
external usenet poster
 
Posts: 35
Default QUERY

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

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/201003/1

  #2  
Old March 6th, 2010, 08:38 AM posted to microsoft.public.access.queries
igg via AccessMonster.com
external usenet poster
 
Posts: 35
Default QUERY

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
b 10 20 8 datea 11

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/201003/1

  #3  
Old March 6th, 2010, 02:11 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default QUERY

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

igg via AccessMonster.com wrote:
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
b 10 20 8 datea 11

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.