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 TouchToneTommy 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

Status
Not open for further replies.

angels2

Technical User
Apr 4, 2004
84
US
Part# QTY Future Current
168DWR 6 5/27/2006 5/27/2006
168DWR 6 5/27/2006 5/27/2006
168DWR 6 5/27/2006 5/29/2006
168DWR 6 5/27/2006 5/29/2006
168DWR 6 5/21/2006 5/22/2006
168DWR 6 5/21/2006 5/22/2006


The above table is a query result I need now to run a query from this information to sum the total parts for future 5/27 and omit any current with the same date so if I sum the 5/27 and omit the 5/27 in the current I would come up with 12 I just want to omit any that hae the same date in each column
Thanks for help
 
Something like this ?
SELECT [Part#], Sum(QTY) As Total, Future
FROM yourTable
WHERE Future <> Current
GROUP BY [Part#], Future

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Code:
Select [Part#], SUM(Qty) As [Quantity]

From myQuery

Where [Future] = #05/27/2006#
  AND [Future] <> [Current]

Group By [Part#]

[small]No! No! You're not thinking ... you're only being logical.
- Neils Bohr[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top