473,396 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to get total of product units in a query

Hey guys, I'm trying to use the query feature to combine entries into a simple format.

For instance,

DATE........ITEM......SALES VOLUME.....TOTAL SALES
07-01-01...Cutlery..........10..............100
07-01-02...Cutlery..........20..............200
07-01-03...Cutlery..........30..............300

How would I set up the query so that I can see

ITEM..............SALES VOLUME..............TOTAL SALES
Cutlery..............60.........................60 0


Please help?
Jul 14 '10 #1
6 1730
mseo
181 100+
@kpkiller85
Welcome to BYTES
DATE........ITEM......SALES VOLUME.....TOTAL SALES
07-01-01...Cutlery..........10..............100
07-01-02...Cutlery..........20..............200
07-01-03...Cutlery..........30..............300
is that table or query
Jul 14 '10 #2
Hi mseo.

Thanks for replying.

Would you care to clarify what "concate" means?

So right now, I have a query showing like this

DATE........ITEM......SALES VOLUME.....TOTAL SALES
07-01-01...Cutlery..........10..............100
07-01-02...Cutlery..........20..............200
07-01-03...Cutlery..........30..............300


Where would I incorporate

[Date]&"..."&[Item]&"..."&[sales Volume]&"..."&[total sales]

to group same records into one?

Sorry for this newbie question =/
Jul 14 '10 #3
mseo
181 100+
there was a misunderstood of your question because it is incorrectly formatted
ok, first of all, you shouldn't use date as field name because it is reserved word use name like SDate but don't use reserved words
table should has Primary key, if not, you should index one field at least
your query should be like this:
Expand|Select|Wrap|Line Numbers
  1. SELECT ItemID,  Sum([Sales volume]), Sum([total sales])
  2. FROM table name
  3. WHERE ([SDate]) Between [SD] And [ED]))
  4. GROUP BY ItemID;
in the where clause I set a parameter for you to show you how you can get the sum of sales between two dates

P.S you haven't mentioned that your table has a relationships with child table or maintable, and if so, you must use join within the query
you can also set the relationship between the tables in query design view

Hope this helps
MSEO
Jul 14 '10 #4
Worked like a charm!! Thank you!
Jul 14 '10 #5
mseo
181 100+
@kpkiller85
hi,
welcome to BYTES again
I happy to hear that form you
you should use code tags click # sign in the toolbar when you need to post the metadata, Code, SQL statements to help us understand your question properly
Jul 14 '10 #6
NeoPa
32,556 Expert Mod 16PB
NB. GROUP BY queries can also be managed in the query editor. Click on the Sigma (looks like a large, reversed, angular 3) button and it will change it for you. You may need to select what to do with some of the fields.
Jul 14 '10 #7

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

Similar topics

2
by: m3ckon | last post by:
Hi there, had to rush some sql and am now going back to it due to a slow db performance. I have a db for sales leads and have created 3 views based on the data I need to produce. However one...
0
by: Kurt Watson | last post by:
I’m having a different kind of problem with Hotmail when I sign in it says, "Web Browser Software Limitations Your Current Software Will Limit Your Ability to Use Hotmail You are using a web...
1
by: A Hirsi | last post by:
I have created a vb .net program as a service that is using a simple ftpclient to connect to a remote server and check the status of a file for subsequent downloading if there have been changes to...
2
by: ericnyc | last post by:
Hi, I am a newbee in C++ Please review this is what I wrote , what so ever I understood so far, My question is that I have to " Write a program C++ array that reads in an integer number and...
0
by: kbloom503 | last post by:
Hi. I am required to take a VB .net 2005 programming course for my business major so have no clue what I am doing. I have a final homework assignment that needs to include a command control that will...
1
by: SyddyS | last post by:
Hi all, please help ASAP! Well, it's been a long and bumpy ride, but my little Access DB is finally graduating and moving out of the house. My homebrewed contact and sales database is being...
6
by: jenipriya | last post by:
Hi all... its very urgent.. please........i m a beginner in oracle.... Anyone please help me wit dese codes i hv tried... and correct the errors... The table structures i hav Employee (EmpID,...
1
imrosie
by: imrosie | last post by:
Please help with this one,,,,,I've been trying everything in my arsenal to fix this one. I'm stumped.... I"ve got a unbound combo box (customername) that has two events (on click); AfterUpdate and...
3
osward
by: osward | last post by:
Hi, everyone, I had managed to make use of the date link from a simple calendar script to my query table. When I click on the date's link or Prev and Next Month link, The table first row will be...
4
by: Oseyo | last post by:
I'm working with Access 2000 Version 9.0. I closed a Database that i was working on and on opening it up again an Error Message displayed "No Current Record" the Help File displays the Error Code as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.