By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,164 Members | 1,019 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,164 IT Pros & Developers. It's quick & easy.

Sum in Query

P: 1
I have a table:
ID_____Mat_____DelvDate_____QtyDelv
1_____ A ______10Jan07_______10
2_____ A ______12Jan07_______ 5
3_____ A _______8Jan07_______ 3
4_____ B ______10Jan07_______ 4
I want to create a query that will return the following result:
ID_____Mat_____DelvDate______X
1_____ A ______10Jan07_______3
2_____ A ______12Jan07_______13
3_____ A _______8Jan07_______0
4_____ B ______10Jan07_______4
Note: X = sum of qty delivered before each delivery date
How could I achieve this?
Aug 6 '07 #1
Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,392
Use a subquery to return the sum.
Aug 6 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.