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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping a field and then Summing the total

Status
Not open for further replies.

gusc999

Technical User
Joined
Nov 20, 2007
Messages
42
Location
US
I'm having an issue with the following query I need to group the query by PIRF_SLOT1.SLITEM field and then sum the qty in the PIRF_SLOT1.SLSTK1 field for every item.

SELECT PIRF_SLOT1.SLITEM, PIRF_PIRITEM.ITDESC, PIRF_SLOT1.SLPICK, PIRF_SLOT1.SLDISP, PIRF_SLOT1.SLSTK1, PIRF_SLOT1.SLSTAT, PIRF_ITEMMSC.IMTIE, PIRF_ITEMMSC.IMHIGH, Sum([SLITEM]) AS [ITEM TOTALS]
FROM PIRF_ITEMMSC INNER JOIN (PIRF_PIRITEM INNER JOIN PIRF_SLOT1 ON PIRF_PIRITEM.ITITEM = PIRF_SLOT1.SLITEM) ON PIRF_ITEMMSC.IMITEM = PIRF_SLOT1.SLITEM
ORDER BY PIRF_SLOT1.SLITEM;
 
Does this work for you? If not, then why?
Code:
SELECT SLITEM, Sum([SLSTK1]) AS [ITEM TOTALS]
FROM PIRF_SLOT1
GROUP BY SLITEM
ORDER BY SLITEM;

Duane MS Access MVP
Now help me support United Cerebral Palsy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top