Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Query Help 1

Status
Not open for further replies.

angels2

Technical User
Apr 4, 2004
84
US
I am trying to combine all like numbers in one column but each has a seperate total in another so I need to combine and sum the totals. Can I email this access query to someone to try to figure out what I need to do I am willing to pay for help
 
DHIDAT DIPART DIDESC DHTOTI
10/12/2004 48605-02010-H LOWER ARM 1813.66
10/12/2004 48605-02010-H LOWER ARM 2176.38
10/13/2004 48605-02010-H LOWER ARM 1692.75
10/13/2004 48605-02010-H LOWER ARM 1843.89
5/5/2004 53211-04903-H SUPPORT 23003.88
12/3/2004 53211-04903-H SUPPORT 40189.8
12/6/2004 53211-04903-H SUPPORT 35056.87
12/21/2004 53211-04903-H SUPPORT 16297.03
4/18/2005 53301-AA040-H HOOD 17722.42
4/19/2005 53301-AA040-H HOOD 16936.22
6/21/2005 53301-AA040-H HOOD 16997.78
6/22/2005 53301-AA040-H HOOD 17788.9
6/22/2005 53301-AA040-H HOOD 27025.42

I need to combine all in column Dipart and also total for each part combined.
 
What have I asked that is wrong I do not understand the last post
 
Could also show how your results should look like...

becasue it is very hard to understand from yuor description what actually you want to do...

its good that you provided some sample data...but it will also be helpful if you provide how your results should look for the above data...

-DNG
 
I should have left out the date but I want the other columns to come out like this with the part number only once and amounts totaled for each part number

DIPART DIDESC DHTOTI
48605-02010-H LOWER ARM 7526.68
53211-04903-H SUPPORT 132,270
53301-AA040-H HOOD 78748.72
 
SELECT DIPART, DIDESC, Sum(DHTOTI) AS Total
FROM yourTable
GROUP BY DIPART, DIDESC

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks for the reply I am very new to Access can you better explain where I need to put the formula's
 
This is SQL code to paste in the SQL view pane of the query window.
You have to tweak it for real table and field names.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
That worked perfect I got the user what he wanted I have another question which may not be able to do but is there a way to group each part by month and the the total for month I would like to get the same results but on a monthly bases. I am trying to get sales results for last 3 years month by month the table has the date of the part.
 
SELECT DIPART, DIDESC, Format([your date field],'yyyy-mm') AS [Month], Sum(DHTOTI) AS Total
FROM yourTable
GROUP BY DIPART, DIDESC, Format([your date field],'yyyy-mm')

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top