What's wrong with my relationships?!

accessjunior

New member
Local time
Yesterday, 22:12
Joined
Jun 10, 2015
Messages
6
So, my question here is purely professional, despite Title of my post ;)
I'm trying to figure out why my supposed "1:1" relationships are not functioning as such.
Basically, I have 2 databases that are feeding from an external link, and another two that are static tables. I'm just trying to create a simple query that takes the data from my linked table "Article_Details_Sales" and adds information from my two static tables, "TBL_Customer_Data" and "TBL_Calendar", as well as from my linked table "Article_Details". So, I linked all of the tables to my "Article_Details_Sales" table via option #1 "Only include rows where the joined fields from both tables are equal", but I'm finding duplicate rows... why?!?! what am I doing wrong?! :banghead:
I've attached a picture to how what I'm talking about... the repeats of article numbers in column 7.
Any/all help would be very much appreciated!!
 

Attachments

  • AccessFrustration.jpg
    AccessFrustration.jpg
    48.8 KB · Views: 110
Hi, It looks like your rows are not duplicate as the right column makes them unique. If you intention is to total the last column then you'll need to group on all, the sum that last one. Hope this helps.

Dave
 
Hi Dave,
Yes, my intention is to total the last column! Can you explain how I do this, I'm not following from your post.
Thanks!
Massa
 
Something like this. Group on the columns you need to group on and then Sum the numbers.

SELECT Table1.Retail_Week, Table1.Division, Sum(Table1.Net_QTY) AS SumOfNet_QTY
FROM Table1
GROUP BY Table1.Retail_Week, Table1.Division;
 
OK, I will give that a try once back at work. I'm assuming the code applies even if it's for a query, not a table?
Thanks Dave!!
 
I usually use queries for everything that is a datasource/rowsource but the SQL is just as good, just not clean in my mind. That's if you are using the results in a form of somekind, or a control etc.

Dave
 

Users who are viewing this thread

Back
Top Bottom