English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

All of my totals are coming out incorrectly when querying the information in my database.

I have just noticed that in the design view - some fields are Indexed as Yes (Duplicates OK).

How will this affect the numbers being output?

2006-09-07 22:51:43 · 2 answers · asked by quay_grl 5 in Computers & Internet Software

My apologies - just learning Access so my question is probably amature.

My table has 109 columns and 202,863 rows of data. Obviously this is my main table.

In my query I am selecting:

Supplier ID, Customer ID, Line Amount (Sales), Line Amount (Cost), Product Group, Month, Warehouse Code.

It is the Supplier ID that is showing Yes (Duplicates OK).

Otherwise I cannot figure out where the problem exists - unless perhaps in the Datawarehouse query where the information is being sourced.

Any ideas?

2006-09-07 23:11:43 · update #1

2 answers

When u select Duplicates Ok, it means that if any results for that field has turned up before, Access will not filter it out from the results.

You must check to make sure that the fields that has to be unique do not have this option set.

e.g. Querying from table which contains sales record. Table fields contains:

1. Date
2. Customer ID
3. Item Description
4. Qty
5. Sales Amount

If your query is to extract out the total sales for every customer, you must not set the Duplicates OK for customer ID. This is to ensure that the results for each customer will only show up under an instance of the Customer ID.

Hope this helps.

2006-09-07 23:03:44 · answer #1 · answered by BunsTTech 3 · 0 0

that would depend on what you are totalling on.
If your totaling is on duplicated columns, then yes, they would.. else that should not impact you.
Incase you want to avoid duplicate, use a "select distinct" clause
would have helped if you had explained your question better though

2006-09-07 23:01:30 · answer #2 · answered by Neil 5 · 0 0

fedest.com, questions and answers