Results 1 to 9 of 9
  1. #1
    Techno is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2023
    Posts
    31

    Intermediate relationship and Many to Many


    While joining two tables on columns that are not unique in either tables but represent same thing, the join type created is Intermediate and it is working fine for Many to Many relationship here. Then why do we need to create an extra joining table to create a many to many relationship (and in which case do we need it if any), can't we just keep on using Intermediate relationships?
    Any help greatly appreciated.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    I have never head the term "intermediate relationship" - only 1-to-1, 1-to-many, many-to-many.

    What is your data? What do you mean by 'represent the same thing'?

    Can provide your db for analysis. Follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Techno is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2023
    Posts
    31
    Attachment 50586

    I am sorry...all this while I was misspelling "Indeterminate" as "Intermediate"

    Represent the same thing - It means here Emp ID is the same data in both tables but both columns are not unique hence in this relationship there is no Primary key. Both foreign keys joined by an indeterminate relationship. And it's working fine.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Your attachment link errors as "invalid".

    You can join on those two fields but if the values are not unique in one you will probably get undesired results.

    Try it. Do you like it?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Techno is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2023
    Posts
    31
    Click image for larger version. 

Name:	Int.jpg 
Views:	18 
Size:	26.9 KB 
ID:	50587

    Thank you

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Okay, you like the output but I don't understand why if neither field has unique values.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Techno is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2023
    Posts
    31
    Both tables are fact tables. These tables are not manually written but system generated. These are listing spendings for employees for IT costs and entertainment, employee ID is the identification for an employee but a single employee can spend more than once on IT as well as entertainment. So Emp ID is a non unique field in both tables.
    Now there was a need to pull some columns of data from entertainment table and add to IT costs via a query (those columns will have same values in every row for a single employee, means it would be correct to return the value found for the first match only for all matches) and hence relationship between these two tables was required. A table with unique Employee ID is not available to join these two. But simply drawing an indeterminate relationship with a left join between these two tables seems to have worked.

  8. #8
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,943
    You could create a query with unique values very simply?
    Then probably UNION both tables with the Employee query.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  9. #9
    Techno is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2023
    Posts
    31
    Yes...thank you...I'll try this approach also...the Employee data in the query will keep on changing as per the changes in the table data it is drawing from.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Intermediate Query
    By wizzz_wizzz in forum Access
    Replies: 3
    Last Post: 04-28-2023, 02:17 AM
  2. An intermediate table?
    By gstudio in forum Access
    Replies: 3
    Last Post: 06-14-2016, 11:04 AM
  3. Best intermediate book?
    By warmslime in forum Access
    Replies: 2
    Last Post: 01-29-2016, 02:57 PM
  4. Replies: 3
    Last Post: 05-25-2015, 05:23 AM
  5. Replies: 3
    Last Post: 03-19-2015, 05:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums