473,395 Members | 2,689 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,395 software developers and data experts.

Assistance with Query

4
This would not let me post new threads for some reason, but heres my problem:

I have several related tables. One table lists orders with due dates for SKUs while another table lists components of a SKU (diamonds). A third related table lists diamond IDs and diamond inventory. One diamond can be included in multiple SKUs and one SKU can contain different types of diamonds. The SKU ID links the SKU component table. The diamond ID links the SKU component table and the diamond type table. The diamond table lists unique types of diamonds plus their total inventory and Diamond ID.

My boss wants me to return the # of diamonds by diamond ID we need to order and the due dates (month totals) minus the inventory on hand. Except the only problem, is that when i create a query, the due date repeats, thus giving multiple columns for each due date per diamond type, even though I only need one. This results in a total inventory subtracted from the total # of diamonds we need in each month. I would like a query that subtracts out the diamonds on hand from the earliest months and leaves the later months for our totals.

Any ideas? Can this be done?

Here is my tables list, this should shed more light on it. But this is actually an ACCESS crosstab with the months going across in columns and the Diamond IDs in rows.

Purchase Orders: There is a one to many between products and purchase_orders
PO_ID (Primary Key)
SKU_ID (Foreign Key)
Quantity_Ordered (numeric)
Due-Date (date)
Order_Completed(Yes/No)

Finished_Products_Table:
SKU_ID (Unique Key)
Product_Name
Product_Descritption

Diamond_Table:
Diamond_ID (Primary Key)
Diamond_Shape
Diamond_Size
Diamond_Quantity_In_Stock

Products_Diamond_Components_Table:
Diamond_Component_Key (Primary Key)
SKU_ID (foreign key)
Diamond_ID
Diamond_Quantity (integer)
Relationships: there is a one to many between diamond table and this table
and a one to many beetween product/sku table and this table
May 21 '09 #1
2 1453
NeoPa
32,556 Expert Mod 16PB
I've split this away from the previous thread as we don't allow hijacking of threads here.

You are able to post new threads. You just have to navigate to the correct area, which is the Answers subforum of whichever forum you're posting in.

Welcome to Bytes!
May 25 '09 #2
JustJim
407 Expert 256MB
G'day,

A couple of questions before we can get started.
  1. When you say SKU, are you talking about Stock-keeping Unit?
  2. When you say diamond are you taking about the gemstone which is an allotrope of carbon?

Jim
May 29 '09 #3

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

Similar topics

5
by: Bill | last post by:
Good Day; I would appreciate assistance developing a query that I haven't been able to develop without using a second table. I wish to count the number of records that are still open on the...
0
by: Rolan | last post by:
I'm using Access 97 and need some assistance in sorting out a proper DSum expression, or maybe even DCount might be an alternative. I have tried numerous combinations, but with no apparent success....
2
by: Dalan | last post by:
I seemed to be having problems with structuring the use of NZ with a DSum expression. Having tried numerous variations of the expression without success, I'm asking for assistance. First some...
4
by: MLH | last post by:
I apologize in advance to forum readers noticing this somewhat redundant post. I fear that my Subject Heading was ill-chosen in earlier post I made on this topic. Am hoping that a clearer Subject...
0
by: Rolan | last post by:
I know what I want to do regarding the average cost for inventory, but need some assistance to sort out some of the details to finalize an inventory table and query. Essentially, the information is...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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...

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.