473,468 Members | 1,314 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Stock DB

44 New Member
Hi am attempting to create a stock database for work. i have created a query called TotalStaffOrders and a query called TotalStockOrders this gives me the total of each item that has been ordered either for stock or staff. It displays total, StockDesc and Size. What i am attempting to do is subtract the totals from the staff table from the stock table where the descriptions are the same. Below is my attempt it does subtract but it subtracts from each value of the stock table.
Thanks for your help
Expand|Select|Wrap|Line Numbers
  1. SELECT [SumOfSSQuantity]-[SumOfQuantity] AS [Total Left], TotalStockOrders.StockDesc, TotalStockOrders.Size
  2. FROM TotalStaffOrders, TotalStockOrders
  3. GROUP BY [SumOfSSQuantity]-[SumOfQuantity], TotalStockOrders.StockDesc, TotalStockOrders.Size;
Dec 12 '11 #1
1 1495
sierra7
446 Recognized Expert Contributor
Hi
There is no join statement in you query so it is impossible for Access to know how to relate TotalStaffOrders with TotalStockOrders.

Furthermore, if these two queries are already summing the items, I can't see why you want a Group By clause.

Perhaps, if you write out the details of these two queries, someone can help.

S7
Dec 12 '11 #2

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

Similar topics

0
by: Marion Slaughter | last post by:
----FA48570F00BB51C Content-Type: text/html; charset="iso-35B2-E" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head>...
7
by: simon | last post by:
Hi I know this has been done to death....but obviously at some point in the dim and distant past! I wish to program a retail database for my shop, I have trawled many forums and I only manage...
9
by: simon.harris | last post by:
I have a 'master' stock list with current stock levels (integer) and another table that contains transactions (i.e. item#, #items added/ removed, date, user etc). What I need is an update query...
6
by: Phreake | last post by:
Hi Guys, I am doing a stock list of Printer tonors, with the following tables Printer_tonor_Stock Tonors Printers ----------------------------- ------------- --------------...
1
by: savvy | last post by:
I am developing a Garments shopping cart. On the single product page where the customer selects size and colour of a garment and if its ok for him, then adds to his basket, so every time he checks...
5
by: kalyxo | last post by:
Hi all! For one of our web-communities we plan an offer of real time stock quotes incl. advanced notification services. I have the following questions: - Do you know of any services, that...
1
by: asmusdk | last post by:
I am working on creating a stock management database for a small company. The company receives the merchandise from a handful of suppliers and stocks it before it is sent to the customers –...
40
by: sazd1 | last post by:
Hi Student2 I am working on similar kind of thing for stock calculation but could not find any solution to my problem even after putting my problem to different forums. I saw your post that you...
0
by: hannoudw | last post by:
hi i'm working on these tables database (for shoes) --------- item_size(Article,size,stock,quantity) item(Article,stock,price,st_q1,st_q2,st_q3,...,st_q10, code_supplier)...
5
by: Rohullah | last post by:
Hello Sir I have Error with the following tables one is And one is. Income table Columns. Date ItemID ItemType Amount DriverName TruckNo --------------------- Stock Table...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.